atlury commited on
Commit
eb067a7
·
verified ·
1 Parent(s): a8e33ed

Update index.html

Browse files
Files changed (1) hide show
  1. 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/speecht5_tts');
 
 
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, { speaker_id: 0 });
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);