non English, here French, example. Ony model URL, locally

speech
Fabien Benetou 4 months ago
parent 89ed593d20
commit 22a8709054
  1. 2
      index.html

@ -94,6 +94,8 @@ async function startVoiceRecognition( callbackOnComplete ) {
const channel = new MessageChannel(); const channel = new MessageChannel();
// const model = await Vosk.createModel('model.tar.gz'); // const model = await Vosk.createModel('model.tar.gz');
const model = await Vosk.createModel('https://fabien.benetou.fr/pub/home/future_of_text_demo/engine/vosk-browser/vosk-model-small-en-us-0.15.tar.gz'); const model = await Vosk.createModel('https://fabien.benetou.fr/pub/home/future_of_text_demo/engine/vosk-browser/vosk-model-small-en-us-0.15.tar.gz');
// more models https://alphacephei.com/vosk/models including French
// e.g here const model = await Vosk.createModel('https://fabien.benetou.fr/pub/home/future_of_text_demo/engine/vosk-browser/vosk-browser/vosk-model-small-fr-pguyot-0.3.zip');
model.registerPort(channel.port1); model.registerPort(channel.port1);
const sampleRate = 48000; const sampleRate = 48000;

Loading…
Cancel
Save