Use single-thread ONNX runtime for mobile speech
Build and publish frontend / publish (push) Successful in 50s
Build and publish frontend / publish (push) Successful in 50s
This commit is contained in:
@@ -13,3 +13,11 @@ test('ONNX Runtime base URL rejects an invalid worker origin', async () => {
|
||||
const {createOnnxWasmPaths} = await import('../piper-onnx-config.mjs');
|
||||
assert.throws(() => createOnnxWasmPaths('undefined'), TypeError);
|
||||
});
|
||||
|
||||
test('ONNX Runtime uses one thread and a bounded startup timeout', async () => {
|
||||
const {configureOnnxRuntime} = await import('../piper-onnx-config.mjs');
|
||||
const runtime = {env: {wasm: {numThreads: 0, initTimeout: 0}}};
|
||||
configureOnnxRuntime(runtime);
|
||||
assert.equal(runtime.env.wasm.numThreads, 1);
|
||||
assert.equal(runtime.env.wasm.initTimeout, 60000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user