Web demo

In this section, we describe the web demo for forced alignment. It is a pure-browser app running on WebAssembly: pick an audio/video file (or record from the microphone), enter its transcript, and get the start/end time of every word.

Hint

It runs locally in your browser, without a backend. No audio is uploaded anywhere.

The source code is in react-examples/forced-alignment (the WebAssembly module is in wasm/forced-alignment).

Try it in your browser

One demo per model; click the URL of the model you want to use. The first visit downloads the model (3–37 MB) with a progress bar; later visits use the browser cache.

Model

Language

Entry point

zh-aishell3-pinyin

Chinese

https://k2-fsa.github.io/sherpa/onnx/forced-alignment/demo/zh-aishell3-pinyin/

zh-biaobei-pinyin

Chinese

https://k2-fsa.github.io/sherpa/onnx/forced-alignment/demo/zh-biaobei-pinyin/

zh-large-pinyin

Chinese

https://k2-fsa.github.io/sherpa/onnx/forced-alignment/demo/zh-large-pinyin/

english-mfa-v2.2.1

English

https://k2-fsa.github.io/sherpa/onnx/forced-alignment/demo/english-mfa-v2.2.1/

english-mfa-v3.0.0

English

https://k2-fsa.github.io/sherpa/onnx/forced-alignment/demo/english-mfa-v3.0.0/

english-mfa-v3.1.0

English

https://k2-fsa.github.io/sherpa/onnx/forced-alignment/demo/english-mfa-v3.1.0/

The same demos can be downloaded from the react-fa release as sherpa-onnx-react-fa-<model>.zip — unzip a file and serve the directory with any static HTTP server to host it yourself. See scripts/mfa/web.md for a description of each file.

Build from source

Please see react-examples/forced-alignment/README.md for how to build the wasm module and the web app yourself.