Overseas access: www.kdjingpai.com
Bookmark Us
Current Position:fig. beginning " AI Answers

How to quickly integrate vosk-browser into a web project via CDN?

2025-08-20 728
Link directMobile View
qrcode

Using a CDN to bring in vosk-browser is the quickest way to integrate, broken down into the following steps:

  1. Introducing Scripts: In the HTML file's<head>maybe<body>Add a CDN link to the
    <script src=’https://cdn.jsdelivr.net/npm/vosk-browser@0.0.5/dist/vosk.js’></script>
  2. Loading Models: Download the .tar.gz zip for the corresponding language from the official model repository (e.g. https://ccoreilly.github.io/vosk-browser/models/)
  3. Initialization::
    1. Asynchronous loading of model files through Vosk.createModel()
    2. Create AudioContext and recognizer instances
    3. Call getUserMedia to get microphone privileges.
    4. Create audio data transfer pipeline through createTransferer

Note: The current latest version is 0.0.8, it is recommended to check for updates via jsDelivr. Small English models (e.g. vosk-model-small-en-us) are about 50MB, suitable for quick testing.

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish