Spaces:
Running
Running
Update index.html
Browse files- index.html +7 -7
index.html
CHANGED
@@ -148,7 +148,7 @@
|
|
148 |
<div class="spinner"></div>
|
149 |
</div>
|
150 |
<div class="container">
|
151 |
-
<h1>Voice Chat
|
152 |
<p class="subtitle">For best results, use headphones.</p>
|
153 |
<div id="chat-container">
|
154 |
<div id="controls">
|
@@ -248,12 +248,12 @@
|
|
248 |
pipeline('text-to-speech', 'Xenova/mms-tts-eng', { quantized: true })
|
249 |
]);
|
250 |
|
251 |
-
addLog('System: Voice Chat
|
252 |
startButton.disabled = false;
|
253 |
loadingDiv.style.display = 'none';
|
254 |
} catch (error) {
|
255 |
console.error('Error initializing pipelines:', error);
|
256 |
-
addLog('System: Error initializing Voice Chat
|
257 |
loadingDiv.style.display = 'none';
|
258 |
}
|
259 |
}
|
@@ -382,7 +382,7 @@
|
|
382 |
noiseSuppression: true, ///Added by RAHUL Atlury
|
383 |
aggressiveness: 3, // Higher value for more aggressive detection Added by RAHUL ATLURY
|
384 |
onSpeechStart: () => {
|
385 |
-
addLog('---
|
386 |
updateVisualizer();
|
387 |
if (isSpeaking) {
|
388 |
addLog('User interrupted. Stopping bot speech.');
|
@@ -391,7 +391,7 @@
|
|
391 |
}
|
392 |
},
|
393 |
onSpeechEnd: (audio) => {
|
394 |
-
addLog('---
|
395 |
cancelAnimationFrame(animationId);
|
396 |
processSpeech(audio);
|
397 |
}
|
@@ -402,7 +402,7 @@
|
|
402 |
isListening = true;
|
403 |
addLog('System: Listening...');
|
404 |
} catch (error) {
|
405 |
-
console.error('Error starting
|
406 |
addLog('System: Error starting voice detection. Please check your microphone and try again.');
|
407 |
}
|
408 |
}
|
@@ -412,7 +412,7 @@
|
|
412 |
try {
|
413 |
await myvad.destroy();
|
414 |
} catch (error) {
|
415 |
-
console.error('Error stopping
|
416 |
}
|
417 |
myvad = null;
|
418 |
}
|
|
|
148 |
<div class="spinner"></div>
|
149 |
</div>
|
150 |
<div class="container">
|
151 |
+
<h1>Digital Human Voice Chat</h1>
|
152 |
<p class="subtitle">For best results, use headphones.</p>
|
153 |
<div id="chat-container">
|
154 |
<div id="controls">
|
|
|
248 |
pipeline('text-to-speech', 'Xenova/mms-tts-eng', { quantized: true })
|
249 |
]);
|
250 |
|
251 |
+
addLog('System: Digital Human Voice Chat initialized. Click "Begin Call" to start.');
|
252 |
startButton.disabled = false;
|
253 |
loadingDiv.style.display = 'none';
|
254 |
} catch (error) {
|
255 |
console.error('Error initializing pipelines:', error);
|
256 |
+
addLog('System: Error initializing Digital Human Voice Chat. Please check the console for details.');
|
257 |
loadingDiv.style.display = 'none';
|
258 |
}
|
259 |
}
|
|
|
382 |
noiseSuppression: true, ///Added by RAHUL Atlury
|
383 |
aggressiveness: 3, // Higher value for more aggressive detection Added by RAHUL ATLURY
|
384 |
onSpeechStart: () => {
|
385 |
+
addLog('--- Voice activity: speech start');
|
386 |
updateVisualizer();
|
387 |
if (isSpeaking) {
|
388 |
addLog('User interrupted. Stopping bot speech.');
|
|
|
391 |
}
|
392 |
},
|
393 |
onSpeechEnd: (audio) => {
|
394 |
+
addLog('--- Voice activity: speech end');
|
395 |
cancelAnimationFrame(animationId);
|
396 |
processSpeech(audio);
|
397 |
}
|
|
|
402 |
isListening = true;
|
403 |
addLog('System: Listening...');
|
404 |
} catch (error) {
|
405 |
+
console.error('Error starting voice activity:', error);
|
406 |
addLog('System: Error starting voice detection. Please check your microphone and try again.');
|
407 |
}
|
408 |
}
|
|
|
412 |
try {
|
413 |
await myvad.destroy();
|
414 |
} catch (error) {
|
415 |
+
console.error('Error stopping voice activity:', error);
|
416 |
}
|
417 |
myvad = null;
|
418 |
}
|