WebAssembly example for VAD + Non-streaming ASR (#1284)

This commit is contained in:
Fangjun Kuang
2024-08-24 13:24:52 +08:00
committed by GitHub
parent 1ef8a7a202
commit 537e163dd0
29 changed files with 1281 additions and 70 deletions

View File

@@ -3,3 +3,6 @@
Please download
https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx
and put `silero_vad.onnx` into the current directory, i.e., `wasm/vad/assets`.
You can find example build script at
https://github.com/k2-fsa/sherpa-onnx/blob/master/.github/workflows/wasm-simd-hf-space-silero-vad.yaml

View File

@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<title>Next-gen Kaldi WebAssembly with sherpa-onnx for Text-to-speech</title>
<title>Next-gen Kaldi WebAssembly with sherpa-onnx for VAD</title>
<style>
h1,div {
text-align: center;

View File

@@ -172,7 +172,6 @@ class Vad {
constructor(configObj, Module) {
this.config = configObj;
const config = initSherpaOnnxVadModelConfig(configObj, Module);
Module._MyPrint(config.ptr);
const handle = Module._SherpaOnnxCreateVoiceActivityDetector(
config.ptr, configObj.bufferSizeInSeconds || 30);
freeConfig(config, Module);