Spaces:
Running
Running
Update index.html
Browse files- index.html +4 -2
index.html
CHANGED
@@ -36,7 +36,9 @@
|
|
36 |
async function initializePipelines() {
|
37 |
try {
|
38 |
sttPipeline = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny.en');
|
39 |
-
ttsPipeline = await pipeline('text-to-speech', 'Xenova/
|
|
|
|
|
40 |
addMessage('System', 'Voice Chat Bot initialized. Click "Start Listening" to begin.');
|
41 |
} catch (error) {
|
42 |
console.error('Error initializing pipelines:', error);
|
@@ -57,7 +59,7 @@
|
|
57 |
const botResponse = `I heard you say: "${transcription.text}". This is a placeholder response.`;
|
58 |
addMessage('Bot', botResponse);
|
59 |
|
60 |
-
const speechOutput = await ttsPipeline(botResponse
|
61 |
playAudio(speechOutput.audio);
|
62 |
} catch (error) {
|
63 |
console.error('Error processing speech:', error);
|
|
|
36 |
async function initializePipelines() {
|
37 |
try {
|
38 |
sttPipeline = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny.en');
|
39 |
+
ttsPipeline = await pipeline('text-to-speech', 'Xenova/mms-tts-eng', {
|
40 |
+
quantized: false,
|
41 |
+
});
|
42 |
addMessage('System', 'Voice Chat Bot initialized. Click "Start Listening" to begin.');
|
43 |
} catch (error) {
|
44 |
console.error('Error initializing pipelines:', error);
|
|
|
59 |
const botResponse = `I heard you say: "${transcription.text}". This is a placeholder response.`;
|
60 |
addMessage('Bot', botResponse);
|
61 |
|
62 |
+
const speechOutput = await ttsPipeline(botResponse);
|
63 |
playAudio(speechOutput.audio);
|
64 |
} catch (error) {
|
65 |
console.error('Error processing speech:', error);
|