Files
..
2024-05-11 20:58:23 +08:00
2026-10-26 22:57:12 +08:00

Introduction

Note: You need Node >= 16.

This repo contains examples for NodeJS. It uses node-addon-api to wrap sherpa-onnx for NodeJS and it supports multiple threads.

Note: ../nodejs-examples uses WebAssembly to wrap sherpa-onnx for NodeJS and it does not support multiple threads.

Before you continue, please first run

npm install # or pnpm install

# For macOS x64
## With npm
export DYLD_LIBRARY_PATH=$PWD/node_modules/sherpa-onnx-darwin-x64:$DYLD_LIBRARY_PATH
## With pnpm
export DYLD_LIBRARY_PATH=$PWD/node_modules/.pnpm/sherpa-onnx-node@<REPLACE-THIS-WITH-THE-INSTALLED-VERSION>/node_modules/sherpa-onnx-darwin-x64:$DYLD_LIBRARY_PATH

# For macOS arm64
## With npm
export DYLD_LIBRARY_PATH=$PWD/node_modules/sherpa-onnx-darwin-arm64:$DYLD_LIBRARY_PATH
## With pnpm
export DYLD_LIBRARY_PATH=$PWD/node_modules/.pnpm/sherpa-onnx-node@<REPLACE-THIS-WITH-THE-INSTALLED-VERSION>/node_modules/sherpa-onnx-darwin-arm64:$DYLD_LIBRARY_PATH

# For Linux x64
## With npm
export LD_LIBRARY_PATH=$PWD/node_modules/sherpa-onnx-linux-x64:$LD_LIBRARY_PATH
## With pnpm
export LD_LIBRARY_PATH=$PWD/node_modules/.pnpm/sherpa-onnx-node@<REPLACE-THIS-WITH-THE-INSTALLED-VERSION>/node_modules/sherpa-onnx-linux-x64:$LD_LIBRARY_PATH

# For Linux arm64, e.g., Raspberry Pi 4
## With npm
export LD_LIBRARY_PATH=$PWD/node_modules/sherpa-onnx-linux-arm64:$LD_LIBRARY_PATH
## With pnpm
export LD_LIBRARY_PATH=$PWD/node_modules/.pnpm/sherpa-onnx-node@<REPLACE-THIS-WITH-THE-INSTALLED-VERSION>/node_modules/sherpa-onnx-linux-arm64:$LD_LIBRARY_PATH

Examples

The following tables list the examples in this folder.

Source separation

File Description
./test_offline_source_separation_spleeter.js Separate vocals and accompaniment with Spleeter.
./test_offline_source_separation_uvr.js Separate vocals and accompaniment with UVR (MDX-Net).

Download the models and sample audio before running these examples:

curl -LO https://github.com/k2-fsa/sherpa-onnx/releases/download/source-separation-models/sherpa-onnx-spleeter-2stems-fp16.tar.bz2
tar xjf sherpa-onnx-spleeter-2stems-fp16.tar.bz2
curl -LO https://github.com/k2-fsa/sherpa-onnx/releases/download/source-separation-models/UVR-MDX-NET-Voc_FT.onnx
curl -LO https://github.com/k2-fsa/sherpa-onnx/releases/download/source-separation-models/qi-feng-le-zh.wav
node test_offline_source_separation_spleeter.js
node test_offline_source_separation_uvr.js

The examples read the stereo test file with readWaveMultiChannel (readWave keeps only the first channel) and write each stem to a single wave file with writeWaveMultiChannel, e.g., spleeter-vocals.wav and spleeter-non-vocals.wav.

OfflineSourceSeparation.process({samples, sampleRate, enableExternalBuffer}) runs synchronously. samples is an array containing one or two Float32Array channels of equal, nonzero length. Mono input is duplicated to stereo internally by sherpa-onnx; you don't need to duplicate it yourself. The native engine resamples input to the model's output sample rate if needed.

The result is {stems, sampleRate}. For the models above, stems[0] is vocals and stems[1] is accompaniment. Each stem is an array of separate stereo Float32Array channels. separator.sampleRate and separator.numStems expose the model's output sample rate and stem count.

enableExternalBuffer defaults to true. Returned channels keep native audio alive independently of the separator and other channels. Set it to false for runtimes such as Electron that require JavaScript-owned buffers.

For UVR-MDX-NET-Voc_FT.onnx in macOS Electron 43.4.1, also disable the ONNX Runtime CPU memory arena to avoid a native allocator trap. Create a provider configuration file, e.g., cpu.config, containing:

EnableCpuMemArena=0

Set model.provider to cpu:./cpu.config when creating the separator, and use enableExternalBuffer: false when processing audio.

Speech enhancement/denoising

File Description
./test_offline_speech_enhancement_gtcrn.js It demonstrates how to use sherpa-onnx JavaScript API for speech enhancement with GTCRN.
./test_offline_speech_enhancement_dpdfnet.js It demonstrates how to use sherpa-onnx JavaScript API for speech enhancement with DPDFNet.
./test_online_speech_enhancement_gtcrn.js It demonstrates how to use sherpa-onnx JavaScript API for online speech enhancement with GTCRN.
./test_online_speech_enhancement_dpdfnet.js It demonstrates how to use sherpa-onnx JavaScript API for online speech enhancement with DPDFNet.
./test_offline_speech_enhancement_voxlock.js It demonstrates how to use sherpa-onnx JavaScript API for target-speaker voice isolation with VoxLock, without a voice sample.
./test_offline_speech_enhancement_voxlock_with_voice_sample.js It demonstrates how to use sherpa-onnx JavaScript API for target-speaker voice isolation with VoxLock, with a voice sample.
./test_online_speech_enhancement_voxlock.js It demonstrates how to use sherpa-onnx JavaScript API for online target-speaker voice isolation with VoxLock, without a voice sample.
./test_online_speech_enhancement_voxlock_with_voice_sample.js It demonstrates how to use sherpa-onnx JavaScript API for online target-speaker voice isolation with VoxLock, with a voice sample.

Speaker diarization

File Description
./test_offline_speaker_diarization.js It demonstrates how to use sherpa-onnx JavaScript API for speaker diarization. It supports speaker segmentation models from pyannote-audio

Add punctuations to text

File Description
./test_offline_punctuation.js Add punctuations to input text using CT transformer. It supports both Chinese and English.
./test_online_punctuation.js Add punctuations to input text using an online/streaming punctuation model.

Voice activity detection (VAD)

File Description
./test_vad_microphone.js VAD with a microphone. It uses silero-vad

Speaker identification

File Description
./test_speaker_identification.js Speaker identification from a file

Spoken language identification

File Description
./test_spoken_language_identification.js Spoken language identification from a file using a multi-lingual Whisper model
./test_vad_spoken_language_identification_microphone.js Spoken language identification from a microphone using a multi-lingual Whisper model

Audio tagging

File Description
./test_audio_tagging_zipformer.js Audio tagging with a Zipformer model
./test_audio_tagging_ced.js Audio tagging with a CED model

Keyword spotting

File Description
./test_keyword_spotter_transducer.js Keyword spotting from a file using a Zipformer model
./test_keyword_spotter_transducer_microphone.js Keyword spotting from a microphone using a Zipformer model

Streaming speech-to-text from files

File Description
./test_asr_streaming_t_one_ctc.js Streaming speech recognition from a file using a T-one CTC model
./test_asr_streaming_transducer.js Streaming speech recognition from a file using a Zipformer transducer model
./test_asr_streaming_transducer_itn.js Streaming speech recognition from a file using a Zipformer transducer model with ITN
./test_asr_streaming_transducer_with_hr.js Streaming speech recognition from a file using a Zipformer transducer model with homophone replacer
./test_asr_streaming_ctc.js Streaming speech recognition from a file using a Zipformer CTC model with greedy search
./test_asr_streaming_ctc_hlg.js Streaming speech recognition from a file using a Zipformer CTC model with HLG decoding
./test_asr_streaming_paraformer.js Streaming speech recognition from a file using a Paraformer model
./test_asr_streaming_nemotron.js Streaming speech recognition from a file using a multilingual NeMo Nemotron transducer model with per-stream language pinning

Streaming speech-to-text from a microphone

File Description
./test_asr_streaming_transducer_microphone.js Streaming speech recognition from a microphone using a Zipformer transducer model
./test_asr_streaming_transducer_microphone_itn.js Streaming speech recognition from a microphone using a Zipformer transducer model with ITN
./test_asr_streaming_ctc_microphone.js Streaming speech recognition from a microphone using a Zipformer CTC model with greedy search
./test_asr_streaming_ctc_hlg_microphone.js Streaming speech recognition from a microphone using a Zipformer CTC model with HLG decoding
./test_asr_streaming_paraformer_microphone.js Streaming speech recognition from a microphone using a Paraformer model

Non-Streaming speech-to-text from files

File Description
./test_asr_non_streaming_transducer.js Non-streaming speech recognition from a file with a Zipformer transducer model
./test_asr_non_streaming_fire_red_asr.js Non-streaming speech recognition from a file using FireRedAsr
./test_asr_non_streaming_fire_red_asr_ctc.js Non-streaming speech recognition from a file using FireRedAsr CTC model
./test_asr_non_streaming_fire_red_asr_ctc_async.js Async non-streaming speech recognition from a file using FireRedAsr CTC model
./test_asr_non_streaming_whisper.js Non-streaming speech recognition from a file using Whisper
./test_vad_with_non_streaming_asr_whisper.js Non-streaming speech recognition from a file using Whisper + Silero VAD
./test_asr_non_streaming_moonshine.js Non-streaming speech recognition from a file using Moonshine
./test_asr_non_streaming_moonshine_v2.js Non-streaming speech recognition from a file using Moonshine v2
./test_vad_with_non_streaming_asr_moonshine.js Non-streaming speech recognition from a file using Moonshine + Silero VAD
./test_asr_non_streaming_nemo_ctc.js Non-streaming speech recognition from a file using a NeMo CTC model with greedy search
./test_asr_non_streaming_wenet_ctc.js Non-streaming speech recognition from a file using a u2pp_conformer_yue CTC model with greedy search
./test_asr_non_streaming_omnilingual_asr_ctc.js Non-streaming speech recognition from a file using a Omnilingual-ASR CTC model with greedy search
./test_asr_non_streaming_medasr_ctc.js Non-streaming speech recognition from a file using a Google MedASR CTC model with greedy search
./test_asr_non_streaming_funasr_nano.js Non-streaming speech recognition from a file using a FunASR Nano model
./test_asr_non_streaming_funasr_nano_async.js Async non-streaming speech recognition from multiple files using a FunASR Nano model
./test_asr_non_streaming_cohere_transcribe.js Non-streaming speech recognition from a file using a Cohere Transcribe model
./test_asr_non_streaming_cohere_transcribe_async.js Async non-streaming speech recognition from multiple files using a Cohere Transcribe model
./test_asr_non_streaming_qwen3_asr.js Non-streaming speech recognition from a file using a Qwen3 ASR model
./test_asr_non_streaming_qwen3_asr_async.js Async non-streaming speech recognition from multiple files using a Qwen3 ASR model
./test_asr_non_streaming_nemo_canary.js Non-streaming speech recognition from a file using a NeMo Canary model
./test_asr_non_streaming_zipformer_ctc.js Non-streaming speech recognition from a file using a Zipformer CTC model with greedy search
./test_asr_non_streaming_nemo_parakeet_tdt_v2.js Non-streaming speech recognition from a file using a NeMo parakeet-tdt-0.6b-v2 model with greedy search
./test_asr_non_streaming_nemo_parakeet_tdt_v2_hotwords.js Non-streaming speech recognition from a file using a NeMo parakeet-tdt-0.6b-v2 model with modified_beam_search and per-stream hotwords
./test_asr_non_streaming_dolphin_ctc.js Non-streaming speech recognition from a file using a [Dolphinhttps://github.com/DataoceanAI/Dolphin]) CTC model with greedy search
./test_asr_non_streaming_paraformer.js Non-streaming speech recognition from a file using Paraformer
./test_asr_non_streaming_paraformer_itn.js Non-streaming speech recognition from a file using Paraformer with ITN
./test_asr_non_streaming_sense_voice.js Non-streaming speech recognition from a file using SenseVoice
./test_asr_non_streaming_sense_voice_with_hr.js Non-streaming speech recognition from a file using SenseVoice with homophone replacer

Non-Streaming speech-to-text from a microphone with VAD

File Description
./test_vad_asr_non_streaming_transducer_microphone.js VAD + Non-streaming speech recognition from a microphone using a Zipformer transducer model
./test_vad_asr_non_streaming_whisper_microphone.js VAD + Non-streaming speech recognition from a microphone using Whisper
./test_vad_asr_non_streaming_moonshine_microphone.js VAD + Non-streaming speech recognition from a microphone using Moonshine
./test_vad_asr_non_streaming_nemo_ctc_microphone.js VAD + Non-streaming speech recognition from a microphone using a NeMo CTC model with greedy search
./test_vad_asr_non_streaming_zipformer_ctc_microphone.js VAD + Non-streaming speech recognition from a microphone using a Zipformer CTC model with greedy search
./test_vad_asr_non_streaming_paraformer_microphone.js VAD + Non-streaming speech recognition from a microphone using Paraformer
./test_vad_asr_non_streaming_sense_voice_microphone.js VAD + Non-streaming speech recognition from a microphone using SenseVoice

Text-to-speech

File Description
./test_tts_non_streaming_pocket_en.js Zero-shot text-to-speech with a PocketTTS English Model
./test_tts_non_streaming_pocket_en_async.js Zero-shot text-to-speech with a PocketTTS English Model using async JS API
./test_tts_non_streaming_pocket_en_play_async.js Zero-shot text-to-speech with a PocketTTS English Model using async JS API and live audio playback
./test_tts_non_streaming_zipvoice_zh_en_lexicon.js Zero-shot text-to-speech with a ZipVoice Chinese/English Model
./test_tts_non_streaming_zipvoice_zh_en_lexicon_async.js Zero-shot text-to-speech with a ZipVoice Chinese/English Model using async JS API
./test_tts_non_streaming_zipvoice_zh_en_lexicon_play_async.js Zero-shot text-to-speech with a ZipVoice Chinese/English Model using async JS API and live audio playback
./test_tts_non_streaming_kitten_en_lexicon.js Text-to-speech with a KittenTTS English Model (async API)
./test_tts_non_streaming_kitten_en_lexicon_sync.js Text-to-speech with a KittenTTS English Model (sync API)
./test_tts_non_streaming_kokoro_en_lexicon.js Text-to-speech with a Kokoro English Model (sync API)
./test_tts_non_streaming_kokoro_en_lexicon_async.js Text-to-speech with a Kokoro English Model (async API)
./test_tts_non_streaming_kokoro_zh_en_lexicon.js Text-to-speech with a Kokoro Model supporting Chinese and English (sync API)
./test_tts_non_streaming_kokoro_zh_en_lexicon_async.js Text-to-speech with a Kokoro Model supporting Chinese and English (async API)
./test_tts_non_streaming_matcha_icefall_en_lexicon.js Text-to-speech with a MatchaTTS English Model (sync API)
./test_tts_non_streaming_matcha_icefall_en_lexicon_async.js Text-to-speech with a MatchaTTS English Model (async API)
./test_tts_non_streaming_matcha_icefall_zh_lexicon.js Text-to-speech with a MatchaTTS Chinese Model (sync API)
./test_tts_non_streaming_matcha_icefall_zh_lexicon_async.js Text-to-speech with a MatchaTTS Chinese Model (async API)
./test_tts_non_streaming_supertonic_en.js Text-to-speech with a Supertonic English Model (sync API)
./test_tts_non_streaming_supertonic_en_async.js Text-to-speech with a Supertonic English Model (async API)
./test_tts_non_streaming_supertonic_en_play_async.js Text-to-speech with a Supertonic English Model (async API + live playback)
./test_tts_non_streaming_vits_piper_en_lexicon.js Text-to-speech with a piper English model (sync API)
./test_tts_non_streaming_vits_piper_en_lexicon_async.js Text-to-speech with a piper English model (async API)
./test_tts_non_streaming_vits_coqui_de.js Text-to-speech with a coqui German model (sync API)
./test_tts_non_streaming_vits_coqui_de_async.js Text-to-speech with a coqui German model (async API)
./test_tts_non_streaming_vits_zh_ll_lexicon.js Text-to-speech with a Chinese model using cppjieba (sync API)
./test_tts_non_streaming_vits_zh_ll_lexicon_async.js Text-to-speech with a Chinese model using cppjieba (async API)
./test_tts_non_streaming_vits_zh_aishell3_lexicon.js Text-to-speech with a Chinese TTS model (sync API)
./test_tts_non_streaming_vits_zh_aishell3_lexicon_async.js Text-to-speech with a Chinese TTS model (async API)

Speaker diarization


curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-segmentation-models/sherpa-onnx-pyannote-segmentation-3-0.tar.bz2
tar xvf sherpa-onnx-pyannote-segmentation-3-0.tar.bz2
rm sherpa-onnx-pyannote-segmentation-3-0.tar.bz2

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_eres2net_base_sv_zh-cn_3dspeaker_16k.onnx

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-segmentation-models/0-four-speakers-zh.wav

node ./test_offline_speaker_diarization.js

Speech enhancement/denoising

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/speech-enhancement-models/gtcrn_simple.onnx
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/speech-enhancement-models/inp_16k.wav

node ./test_offline_speech_enhancement_gtcrn.js

For VoxLock (the model is from https://github.com/arbazsiddiqui/voxlock):

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/speech-enhancement-models/sherpa-onnx-voxlock-int8.tar.bz2
tar xvf sherpa-onnx-voxlock-int8.tar.bz2

node ./test_offline_speech_enhancement_voxlock.js
node ./test_offline_speech_enhancement_voxlock_with_voice_sample.js
node ./test_online_speech_enhancement_voxlock.js
node ./test_online_speech_enhancement_voxlock_with_voice_sample.js

Voice Activity detection (VAD)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx


# To run the test with a microphone, you need to install the package node-cpal
npm install node-cpal

node ./test_vad_microphone.js

Audio tagging with zipformer

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/audio-tagging-models/sherpa-onnx-zipformer-small-audio-tagging-2024-04-15.tar.bz2
tar xvf sherpa-onnx-zipformer-small-audio-tagging-2024-04-15.tar.bz2
rm sherpa-onnx-zipformer-small-audio-tagging-2024-04-15.tar.bz2

node ./test_audio_tagging_zipformer.js

Audio tagging with CED

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/audio-tagging-models/sherpa-onnx-ced-mini-audio-tagging-2024-09-14.tar.bz2
tar xvf sherpa-onnx-ced-mini-audio-tagging-2024-09-14.tar.bz2
rm sherpa-onnx-ced-mini-audio-tagging-2024-09-14.tar.bz2

node ./test_audio_tagging_ced.js

Streaming speech recognition with Zipformer transducer with homophone replacer

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
rm sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/dict.tar.bz2
tar xf dict.tar.bz2

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/replace.fst
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/test-hr.wav
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/lexicon.txt

node ./test_asr_streaming_transducer_with_hr.js

Streaming speech recognition with T-one CTC

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-t-one-russian-2025-09-08.tar.bz2
tar xvf sherpa-onnx-streaming-t-one-russian-2025-09-08.tar.bz2
rm sherpa-onnx-streaming-t-one-russian-2025-09-08.tar.bz2

node ./test_asr_streaming_t_one_ctc.js

Streaming speech recognition with Zipformer transducer

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
rm sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2

node ./test_asr_streaming_transducer.js

# To run the test with a microphone, you need to install the package node-cpal
npm install node-cpal

node ./test_asr_streaming_transducer_microphone.js

Streaming speech recognition with multilingual Nemotron

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-1120ms-int8-2026-06-11.tar.bz2
tar xvf sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-1120ms-int8-2026-06-11.tar.bz2
rm sherpa-onnx-nemotron-3.5-asr-streaming-0.6b-1120ms-int8-2026-06-11.tar.bz2

node ./test_asr_streaming_nemotron.js

Streaming speech recognition with Zipformer CTC

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18.tar.bz2
rm sherpa-onnx-streaming-zipformer-ctc-small-2024-03-18.tar.bz2

node ./test_asr_streaming_ctc.js

# To decode with HLG.fst
node ./test_asr_streaming_ctc_hlg.js

# To run the test with a microphone, you need to install the package node-cpal
npm install node-cpal

node ./test_asr_streaming_ctc_microphone.js
node ./test_asr_streaming_ctc_hlg_microphone.js

Streaming speech recognition with Paraformer

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
rm sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2

node ./test_asr_streaming_paraformer.js

# To run the test with a microphone, you need to install the package node-cpal
npm install node-cpal

node ./test_asr_streaming_paraformer_microphone.js

Non-streaming speech recognition with Zipformer transducer

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
tar xvf sherpa-onnx-zipformer-en-2023-04-01.tar.bz2
rm sherpa-onnx-zipformer-en-2023-04-01.tar.bz2

node ./test_asr_non_streaming_transducer.js

# To run VAD + non-streaming ASR with transducer using a microphone
npm install node-cpal
node ./test_vad_asr_non_streaming_transducer_microphone.js

Non-streaming speech recognition with FireRedAsr

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16.tar.bz2
tar xvf sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16.tar.bz2
rm sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16.tar.bz2

node ./test_asr_non_streaming_fire_red_asr.js

Non-streaming speech recognition with FireRedAsr CTC

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-fire-red-asr2-ctc-zh_en-int8-2026-02-25.tar.bz2
tar xvf sherpa-onnx-fire-red-asr2-ctc-zh_en-int8-2026-02-25.tar.bz2
rm sherpa-onnx-fire-red-asr2-ctc-zh_en-int8-2026-02-25.tar.bz2

node ./test_asr_non_streaming_fire_red_asr_ctc.js
node ./test_asr_non_streaming_fire_red_asr_ctc_async.js

Non-streaming speech recognition with Whisper

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
rm sherpa-onnx-whisper-tiny.en.tar.bz2

node ./test_asr_non_streaming_whisper.js

# To run VAD + non-streaming ASR with Whisper using a microphone
npm install node-cpal
node ./test_vad_asr_non_streaming_whisper_microphone.js

Non-streaming speech recognition with Moonshine v2

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-moonshine-tiny-en-quantized-2026-02-27.tar.bz2
tar xvf sherpa-onnx-moonshine-tiny-en-quantized-2026-02-27.tar.bz2
rm sherpa-onnx-moonshine-tiny-en-quantized-2026-02-27.tar.bz2

node ./test_asr_non_streaming_moonshine_v2.js

Non-streaming speech recognition with Moonshine

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-moonshine-tiny-en-int8.tar.bz2
tar xvf sherpa-onnx-moonshine-tiny-en-int8.tar.bz2
rm sherpa-onnx-moonshine-tiny-en-int8.tar.bz2

node ./test_asr_non_streaming_moonshine.js

# To run VAD + non-streaming ASR with Moonshine using a microphone
npm install node-cpal
node ./test_vad_asr_non_streaming_moonshine_microphone.js

Non-streaming speech recognition with Moonshine + VAD

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-moonshine-tiny-en-int8.tar.bz2
tar xvf sherpa-onnx-moonshine-tiny-en-int8.tar.bz2
rm sherpa-onnx-moonshine-tiny-en-int8.tar.bz2

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/Obama.wav
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx

node ./test_vad_with_non_streaming_asr_moonshine.js

Non-streaming speech recognition with Whisper + VAD

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.en.tar.bz2
tar xvf sherpa-onnx-whisper-tiny.en.tar.bz2
rm sherpa-onnx-whisper-tiny.en.tar.bz2

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/Obama.wav
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx

node ./test_vad_with_non_streaming_asr_whisper.js

Non-streaming speech recognition with Dolphin CTC models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-dolphin-base-ctc-multi-lang-int8-2025-04-02.tar.bz2
tar xvf sherpa-onnx-dolphin-base-ctc-multi-lang-int8-2025-04-02.tar.bz2
rm sherpa-onnx-dolphin-base-ctc-multi-lang-int8-2025-04-02.tar.bz2

node ./test_asr_non_streaming_dolphin_ctc.js

Non-streaming speech recognition with NeMo parakeet-tdt-0.6b-v2 models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8.tar.bz2
tar xvf sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8.tar.bz2
rm sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8.tar.bz2

node ./test_asr_non_streaming_nemo_parakeet_tdt_v2.js

# Per-stream hotwords (contextual biasing) with modified_beam_search
node ./test_asr_non_streaming_nemo_parakeet_tdt_v2_hotwords.js

Non-streaming speech recognition with Zipformer CTC models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03.tar.bz2

tar xvf sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03.tar.bz2
rm sherpa-onnx-zipformer-ctc-zh-int8-2025-07-03.tar.bz2

node ./test_asr_non_streaming_zipformer_ctc.js

# To run VAD + non-streaming ASR with Paraformer using a microphone
npm install node-cpal
node ./test_vad_asr_non_streaming_zipformer_ctc_microphone.js

Non-streaming speech recognition with NeMo Canary models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-canary-180m-flash-en-es-de-fr-int8.tar.bz2
tar xvf sherpa-onnx-nemo-canary-180m-flash-en-es-de-fr-int8.tar.bz2
rm sherpa-onnx-nemo-canary-180m-flash-en-es-de-fr-int8.tar.bz2

node ./test_asr_non_streaming_nemo_canary.js

Non-streaming speech recognition with NeMo CTC models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-fast-conformer-ctc-be-de-en-es-fr-hr-it-pl-ru-uk-20k.tar.bz2
tar xvf sherpa-onnx-nemo-fast-conformer-ctc-be-de-en-es-fr-hr-it-pl-ru-uk-20k.tar.bz2
rm sherpa-onnx-nemo-fast-conformer-ctc-be-de-en-es-fr-hr-it-pl-ru-uk-20k.tar.bz2

node ./test_asr_non_streaming_nemo_ctc.js

# To run VAD + non-streaming ASR with Paraformer using a microphone
npm install node-cpal
node ./test_vad_asr_non_streaming_nemo_ctc_microphone.js

Asynchronous non-streaming speech recognition with FunASR Nano models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-funasr-nano-int8-2025-12-30.tar.bz2
tar xvf sherpa-onnx-funasr-nano-int8-2025-12-30.tar.bz2
rm sherpa-onnx-funasr-nano-int8-2025-12-30.tar.bz2

node ./test_asr_non_streaming_funasr_nano_async.js

Non-streaming speech recognition with FunASR Nano models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-funasr-nano-int8-2025-12-30.tar.bz2
tar xvf sherpa-onnx-funasr-nano-int8-2025-12-30.tar.bz2
rm sherpa-onnx-funasr-nano-int8-2025-12-30.tar.bz2

node ./test_asr_non_streaming_funasr_nano.js

Asynchronous non-streaming speech recognition with Cohere Transcribe models

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-cohere-transcribe-14-lang-int8-2026-04-01.tar.bz2
tar xvf sherpa-onnx-cohere-transcribe-14-lang-int8-2026-04-01.tar.bz2
rm sherpa-onnx-cohere-transcribe-14-lang-int8-2026-04-01.tar.bz2

node ./test_asr_non_streaming_cohere_transcribe_async.js

Non-streaming speech recognition with Cohere Transcribe models

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-cohere-transcribe-14-lang-int8-2026-04-01.tar.bz2
tar xvf sherpa-onnx-cohere-transcribe-14-lang-int8-2026-04-01.tar.bz2
rm sherpa-onnx-cohere-transcribe-14-lang-int8-2026-04-01.tar.bz2

node ./test_asr_non_streaming_cohere_transcribe.js

Asynchronous non-streaming speech recognition with Qwen3 ASR models

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-qwen3-asr-0.6B-int8-2026-03-25.tar.bz2
tar xvf sherpa-onnx-qwen3-asr-0.6B-int8-2026-03-25.tar.bz2
rm sherpa-onnx-qwen3-asr-0.6B-int8-2026-03-25.tar.bz2

node ./test_asr_non_streaming_qwen3_asr_async.js

Non-streaming speech recognition with Qwen3 ASR models

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-qwen3-asr-0.6B-int8-2026-03-25.tar.bz2
tar xvf sherpa-onnx-qwen3-asr-0.6B-int8-2026-03-25.tar.bz2
rm sherpa-onnx-qwen3-asr-0.6B-int8-2026-03-25.tar.bz2

node ./test_asr_non_streaming_qwen3_asr.js

Non-streaming speech recognition with Google MedASR CTC models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-medasr-ctc-en-int8-2025-12-25.tar.bz2
tar xvf sherpa-onnx-medasr-ctc-en-int8-2025-12-25.tar.bz2
rm sherpa-onnx-medasr-ctc-en-int8-2025-12-25.tar.bz2

node ./test_asr_non_streaming_medasr_ctc.js

Non-streaming speech recognition with Omnilingual ASR CTC models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-omnilingual-asr-1600-languages-300M-ctc-int8-2025-11-12.tar.bz2
tar xvf sherpa-onnx-omnilingual-asr-1600-languages-300M-ctc-int8-2025-11-12.tar.bz2
rm sherpa-onnx-omnilingual-asr-1600-languages-300M-ctc-int8-2025-11-12.tar.bz2

node ./test_asr_non_streaming_omnilingual_asr_ctc.js

Non-streaming speech recognition with WeNet CTC models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-wenetspeech-yue-u2pp-conformer-ctc-zh-en-cantonese-int8-2025-09-10.tar.bz2
tar xvf sherpa-onnx-wenetspeech-yue-u2pp-conformer-ctc-zh-en-cantonese-int8-2025-09-10.tar.bz2
rm sherpa-onnx-wenetspeech-yue-u2pp-conformer-ctc-zh-en-cantonese-int8-2025-09-10.tar.bz2

node ./test_asr_non_streaming_wenet_ctc.js

Non-streaming speech recognition with Paraformer

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
tar xvf sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2
rm sherpa-onnx-paraformer-zh-2023-09-14.tar.bz2

node ./test_asr_non_streaming_paraformer.js

# To run VAD + non-streaming ASR with Paraformer using a microphone
npm install node-cpal
node ./test_vad_asr_non_streaming_paraformer_microphone.js

Non-streaming speech recognition with SenseVoice with homophone replacer

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2
tar xvf sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2
rm sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/dict.tar.bz2
tar xf dict.tar.bz2

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/replace.fst
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/test-hr.wav
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/hr-files/lexicon.txt

node ./test_asr_non_streaming_sense_voice_with_hr.js

Non-streaming speech recognition with SenseVoice

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2
tar xvf sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2
rm sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2024-07-17.tar.bz2

node ./test_asr_non_streaming_sense_voice.js

# To run VAD + non-streaming ASR with Paraformer using a microphone
npm install node-cpal
node ./test_vad_asr_non_streaming_sense_voice_microphone.js

Zero-shot text-to-speech with PocketTTS models (English TTS, async API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2
tar xf sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2
rm sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2

node ./test_tts_non_streaming_pocket_en_async.js

Zero-shot text-to-speech with PocketTTS models (English TTS, async API + playback)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2
tar xf sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2
rm sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2

npm install speaker

node ./test_tts_non_streaming_pocket_en_play_async.js

Zero-shot text-to-speech with PocketTTS models (English TTS, sync API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2
tar xf sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2
rm sherpa-onnx-pocket-tts-int8-2026-01-26.tar.bz2

node ./test_tts_non_streaming_pocket_en.js

Zero-shot text-to-speech with ZipVoice models (Chinese/English TTS, async API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2
tar xf sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2
rm sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/vocos_24khz.onnx

# The reference text must match the reference audio transcript.
node ./test_tts_non_streaming_zipvoice_zh_en_lexicon_async.js

Zero-shot text-to-speech with ZipVoice models (Chinese/English TTS, async API + playback)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2
tar xf sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2
rm sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/vocos_24khz.onnx

# Install the playback package once.
npm install speaker

# The reference text must match the reference audio transcript.
node ./test_tts_non_streaming_zipvoice_zh_en_lexicon_play_async.js

Zero-shot text-to-speech with ZipVoice models (Chinese/English TTS, sync API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2
tar xf sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2
rm sherpa-onnx-zipvoice-distill-int8-zh-en-emilia.tar.bz2

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/vocos_24khz.onnx

# The reference text must match the reference audio transcript.
node ./test_tts_non_streaming_zipvoice_zh_en_lexicon.js

Text-to-speech with KittenTTS models (English TTS, async API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/kitten-nano-en-v0_1-fp16.tar.bz2
tar xf kitten-nano-en-v0_1-fp16.tar.bz2
rm kitten-nano-en-v0_1-fp16.tar.bz2

node ./test_tts_non_streaming_kitten_en_lexicon.js

Text-to-speech with KittenTTS models (English TTS, sync API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/kitten-nano-en-v0_1-fp16.tar.bz2
tar xf kitten-nano-en-v0_1-fp16.tar.bz2
rm kitten-nano-en-v0_1-fp16.tar.bz2

node ./test_tts_non_streaming_kitten_en_lexicon_sync.js

Text-to-speech with Supertonic TTS models (English TTS, sync API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2
tar xf sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2
rm sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2

node ./test_tts_non_streaming_supertonic_en.js

Text-to-speech with Supertonic TTS models (English TTS, async API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2
tar xf sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2
rm sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2

node ./test_tts_non_streaming_supertonic_en_async.js

Text-to-speech with Supertonic TTS models (English TTS, async API + playback)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2
tar xf sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2
rm sherpa-onnx-supertonic-3-tts-int8-2026-05-11.tar.bz2

npm install speaker

node ./test_tts_non_streaming_supertonic_en_play_async.js

Text-to-speech with Kokoro TTS models (Chinese + English TTS, sync API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/kokoro-multi-lang-v1_0.tar.bz2
tar xf kokoro-multi-lang-v1_0.tar.bz2
rm kokoro-multi-lang-v1_0.tar.bz2

node ./test_tts_non_streaming_kokoro_zh_en_lexicon.js

Text-to-speech with Kokoro TTS models (Chinese + English TTS, async API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/kokoro-multi-lang-v1_0.tar.bz2
tar xf kokoro-multi-lang-v1_0.tar.bz2
rm kokoro-multi-lang-v1_0.tar.bz2

node ./test_tts_non_streaming_kokoro_zh_en_lexicon_async.js

Text-to-speech with Kokoro TTS models (English TTS, sync API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/kokoro-en-v0_19.tar.bz2
tar xf kokoro-en-v0_19.tar.bz2
rm kokoro-en-v0_19.tar.bz2

node ./test_tts_non_streaming_kokoro_en_lexicon.js

Text-to-speech with Kokoro TTS models (English TTS, async API)

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/kokoro-en-v0_19.tar.bz2
tar xf kokoro-en-v0_19.tar.bz2
rm kokoro-en-v0_19.tar.bz2

node ./test_tts_non_streaming_kokoro_en_lexicon_async.js

Text-to-speech with MatchaTTS models (English TTS, sync API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-en_US-ljspeech.tar.bz2
tar xf matcha-icefall-en_US-ljspeech.tar.bz2
rm matcha-icefall-en_US-ljspeech.tar.bz2

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/vocos-22khz-univ.onnx

node ./test_tts_non_streaming_matcha_icefall_en_lexicon.js

Text-to-speech with MatchaTTS models (English TTS, async API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-en_US-ljspeech.tar.bz2
tar xf matcha-icefall-en_US-ljspeech.tar.bz2
rm matcha-icefall-en_US-ljspeech.tar.bz2

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/vocos-22khz-univ.onnx

node ./test_tts_non_streaming_matcha_icefall_en_lexicon_async.js

Text-to-speech with MatchaTTS models (Chinese TTS, sync API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-zh-baker.tar.bz2
tar xvf matcha-icefall-zh-baker.tar.bz2
rm matcha-icefall-zh-baker.tar.bz2

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/vocos-22khz-univ.onnx

node ./test_tts_non_streaming_matcha_icefall_zh_lexicon.js

Text-to-speech with MatchaTTS models (Chinese TTS, async API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-zh-baker.tar.bz2
tar xvf matcha-icefall-zh-baker.tar.bz2
rm matcha-icefall-zh-baker.tar.bz2

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/vocos-22khz-univ.onnx

node ./test_tts_non_streaming_matcha_icefall_zh_lexicon_async.js

Text-to-speech with piper VITS models (sync API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_GB-cori-medium.tar.bz2
tar xvf vits-piper-en_GB-cori-medium.tar.bz2
rm vits-piper-en_GB-cori-medium.tar.bz2

node ./test_tts_non_streaming_vits_piper_en_lexicon.js

Text-to-speech with piper VITS models (async API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_GB-cori-medium.tar.bz2
tar xvf vits-piper-en_GB-cori-medium.tar.bz2
rm vits-piper-en_GB-cori-medium.tar.bz2

node ./test_tts_non_streaming_vits_piper_en_lexicon_async.js

Text-to-speech with Coqui-ai/TTS VITS models (German, sync API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-coqui-de-css10.tar.bz2
tar xvf vits-coqui-de-css10.tar.bz2
rm vits-coqui-de-css10.tar.bz2

node ./test_tts_non_streaming_vits_coqui_de.js

Text-to-speech with Coqui-ai/TTS VITS models (German, async API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-coqui-de-css10.tar.bz2
tar xvf vits-coqui-de-css10.tar.bz2
rm vits-coqui-de-css10.tar.bz2

node ./test_tts_non_streaming_vits_coqui_de_async.js

Text-to-speech with vits Chinese zh-ll models (sync API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-vits-zh-ll.tar.bz2
tar xvf sherpa-onnx-vits-zh-ll.tar.bz2
rm sherpa-onnx-vits-zh-ll.tar.bz2

node ./test_tts_non_streaming_vits_zh_ll_lexicon.js

Text-to-speech with vits Chinese zh-ll models (async API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/sherpa-onnx-vits-zh-ll.tar.bz2
tar xvf sherpa-onnx-vits-zh-ll.tar.bz2
rm sherpa-onnx-vits-zh-ll.tar.bz2

node ./test_tts_non_streaming_vits_zh_ll_lexicon_async.js

Text-to-speech with vits Chinese AiShell3 models (sync API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2
tar xvf vits-icefall-zh-aishell3.tar.bz2
rm vits-icefall-zh-aishell3.tar.bz2

node ./test_tts_non_streaming_vits_zh_aishell3_lexicon.js

Text-to-speech with vits Chinese AiShell3 models (async API)

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-icefall-zh-aishell3.tar.bz2
tar xvf vits-icefall-zh-aishell3.tar.bz2
rm vits-icefall-zh-aishell3.tar.bz2

node ./test_tts_non_streaming_vits_zh_aishell3_lexicon_async.js

Spoken language identification with Whisper multi-lingual models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.tar.bz2
tar xvf sherpa-onnx-whisper-tiny.tar.bz2
rm sherpa-onnx-whisper-tiny.tar.bz2

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/spoken-language-identification-test-wavs.tar.bz2
tar xvf spoken-language-identification-test-wavs.tar.bz2
rm spoken-language-identification-test-wavs.tar.bz2

node ./test_spoken_language_identification.js

# To run VAD + spoken language identification using a microphone
npm install node-cpal
node ./test_vad_spoken_language_identification_microphone.js

Speaker identification

You can find more models at https://github.com/k2-fsa/sherpa-onnx/releases/tag/speaker-recongition-models

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_eres2net_base_sv_zh-cn_3dspeaker_16k.onnx

git clone https://github.com/csukuangfj/sr-data

node ./test_speaker_identification.js

Add punctuations

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/punctuation-models/sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
tar xvf sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
rm sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2

node ./test_offline_punctuation.js

Online punctuation

curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/punctuation-models/sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
tar xvf sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
rm sherpa-onnx-online-punct-en-2024-08-06.tar.bz2

node ./test_online_punctuation.js

Keyword spotting

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/kws-models/sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2
tar xvf sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2
rm sherpa-onnx-kws-zipformer-wenetspeech-3.3M-2024-01-01.tar.bz2

node ./test_keyword_spotter_transducer.js

# To run keyword spotting using a microphone
npm install node-cpal
node ./test_keyword_spotter_transducer_microphone.js