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:
@@ -5,3 +5,10 @@ export function createOnnxWasmPaths(origin) {
|
||||
return absoluteAssetRoot;
|
||||
}
|
||||
|
||||
export function configureOnnxRuntime(onnxRuntime) {
|
||||
if (!onnxRuntime?.env?.wasm) throw new TypeError('ONNX Runtime WebAssembly settings are unavailable.');
|
||||
// Piper already runs in a worker. Avoid a second worker pool on mobile Safari.
|
||||
onnxRuntime.env.wasm.numThreads = 1;
|
||||
onnxRuntime.env.wasm.initTimeout = 60000;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user