add WebAssembly for Kws (#648)

This commit is contained in:
Lovemefan
2024-03-11 21:02:31 +08:00
committed by GitHub
parent a628002d8f
commit 009ed2cd30
14 changed files with 807 additions and 8 deletions

40
wasm/kws/index.html Normal file
View File

@@ -0,0 +1,40 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<title>Next-gen Kaldi WebAssembly with sherpa-onnx for kws</title>
<style>
h1,div {
text-align: center;
}
textarea {
width:100%;
}
</style>
</head>
<body>
<h1>
WebAssembly<br/>
Kws Demo with <a href="https://github.com/k2-fsa/sherpa-onnx">sherpa-onnx</a>
</h1>
<div>
<span id="hint">Loading model ... ...</span>
<br/>
<br/>
<button id="startBtn" disabled>Start</button>
<button id="stopBtn" disabled>Stop</button>
<button id="clearBtn">Clear</button>
<br/>
<br/>
<textarea id="results" rows="10" readonly></textarea>
</div>
<section flex="1" overflow="auto" id="sound-clips">
</section>
<script src="sherpa-onnx-kws.js"></script>
<script src="app.js"></script>
<script src="sherpa-onnx-wasm-kws-main.js"></script>
</body>