Commit
·
755a940
1
Parent(s):
7f1e64c
update model
Browse files- app-vad-asr.js +12 -0
- sherpa-onnx-wasm-main-vad-asr.js +0 -0
- sherpa-onnx-wasm-main-vad-asr.wasm +2 -2
app-vad-asr.js
CHANGED
|
@@ -140,6 +140,18 @@ Module.setStatus = function(status) {
|
|
| 140 |
if (status == 'Running...') {
|
| 141 |
status = 'Model downloaded. Initializing recongizer...'
|
| 142 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
statusElement.textContent = status;
|
| 144 |
if (status === '') {
|
| 145 |
statusElement.style.display = 'none';
|
|
|
|
| 140 |
if (status == 'Running...') {
|
| 141 |
status = 'Model downloaded. Initializing recongizer...'
|
| 142 |
}
|
| 143 |
+
|
| 144 |
+
const downloadMatch = status.match(/Downloading data... \((\d+)\/(\d+)\)/);
|
| 145 |
+
if (downloadMatch) {
|
| 146 |
+
const downloaded = BigInt(downloadMatch[1]);
|
| 147 |
+
const total = BigInt(downloadMatch[2]);
|
| 148 |
+
const percent =
|
| 149 |
+
total === 0 ? 0.00 : Number((downloaded * 10000n) / total) / 100;
|
| 150 |
+
status = `Downloading data... ${percent.toFixed(2)}% (${downloadMatch[1]}/${
|
| 151 |
+
downloadMatch[2]})`;
|
| 152 |
+
console.log(`here ${status}`)
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
statusElement.textContent = status;
|
| 156 |
if (status === '') {
|
| 157 |
statusElement.style.display = 'none';
|
sherpa-onnx-wasm-main-vad-asr.js
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
sherpa-onnx-wasm-main-vad-asr.wasm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2fc8dc389b23ad07f0d526b2e7c7c828543956d053db858d73cff192be7589e3
|
| 3 |
+
size 11539169
|