Use PhaseB FP16 IOFP32 browser artifact
Browse files- __pycache__/app.cpython-311.pyc +0 -0
- app.js +4 -4
__pycache__/app.cpython-311.pyc
ADDED
|
Binary file (8.78 kB). View file
|
|
|
app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
const MODEL_REPO = "Reza2kn/visualears-fastconformer-fa-depoisoned-phaseB-onnx-fp16";
|
| 2 |
-
const MODEL_FILE = "
|
| 3 |
-
const MODEL_DATA_FILE = "
|
| 4 |
-
const MODEL_EMBEDDED_FILE = "
|
| 5 |
const MODEL_URL = `https://huggingface.co/${MODEL_REPO}/resolve/main/${MODEL_FILE}`;
|
| 6 |
const MODEL_DATA_URL = `https://huggingface.co/${MODEL_REPO}/resolve/main/${MODEL_DATA_FILE}`;
|
| 7 |
const MODEL_EMBEDDED_URL = `https://huggingface.co/${MODEL_REPO}/resolve/main/${MODEL_EMBEDDED_FILE}`;
|
|
@@ -570,7 +570,7 @@ async function decodeUtterance(final) {
|
|
| 570 |
const { features, frameCount } = pcmToLogMel(audio);
|
| 571 |
const ort = state.ort || ortRuntime;
|
| 572 |
if (!ort) throw new Error("ONNX Runtime Web did not initialize");
|
| 573 |
-
const tensor = new ort.Tensor("
|
| 574 |
const lengthTensor = new ort.Tensor("int64", BigInt64Array.from([BigInt(frameCount)]), [1]);
|
| 575 |
const inferStarted = performance.now();
|
| 576 |
const output = await state.session.run({ processed_signal: tensor, processed_signal_length: lengthTensor });
|
|
|
|
| 1 |
const MODEL_REPO = "Reza2kn/visualears-fastconformer-fa-depoisoned-phaseB-onnx-fp16";
|
| 2 |
+
const MODEL_FILE = "fastconformer_phaseB_ctc_fixed2005_len_fp16_iofp32.onnx";
|
| 3 |
+
const MODEL_DATA_FILE = "fastconformer_phaseB_ctc_fixed2005_len_fp16_iofp32.onnx.data";
|
| 4 |
+
const MODEL_EMBEDDED_FILE = "fastconformer_phaseB_ctc_fixed2005_len_fp16_iofp32_embedded.onnx";
|
| 5 |
const MODEL_URL = `https://huggingface.co/${MODEL_REPO}/resolve/main/${MODEL_FILE}`;
|
| 6 |
const MODEL_DATA_URL = `https://huggingface.co/${MODEL_REPO}/resolve/main/${MODEL_DATA_FILE}`;
|
| 7 |
const MODEL_EMBEDDED_URL = `https://huggingface.co/${MODEL_REPO}/resolve/main/${MODEL_EMBEDDED_FILE}`;
|
|
|
|
| 570 |
const { features, frameCount } = pcmToLogMel(audio);
|
| 571 |
const ort = state.ort || ortRuntime;
|
| 572 |
if (!ort) throw new Error("ONNX Runtime Web did not initialize");
|
| 573 |
+
const tensor = new ort.Tensor("float32", features, [1, N_MELS, FIXED_FRAMES]);
|
| 574 |
const lengthTensor = new ort.Tensor("int64", BigInt64Array.from([BigInt(frameCount)]), [1]);
|
| 575 |
const inferStarted = performance.now();
|
| 576 |
const output = await state.session.run({ processed_signal: tensor, processed_signal_length: lengthTensor });
|