Fix Piper ONNX runtime asset URLs
Build and publish frontend / publish (push) Failing after 2s

This commit is contained in:
Ein Anderssono
2026-10-16 07:15:12 +02:00
parent 696a47a9a2
commit c618d2e31e
6 changed files with 41 additions and 7 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import {TtsSession} from '@mintplex-labs/piper-tts-web';
import {localPiperModelUrl} from './piper-model-routing.mjs';
import {createOnnxWasmPaths} from './piper-onnx-config.mjs';
const VOICE_ID = 'sv_SE-nst-medium';
const ASSET_ROOT = '/tts/piper-wasm-v1';
@@ -24,7 +25,7 @@ async function getSession(onProgress) {
voiceId: VOICE_ID,
progress: onProgress,
wasmPaths: {
onnxWasm: `${ASSET_ROOT}/onnx/`,
onnxWasm: createOnnxWasmPaths(self.location.origin),
piperData: `${ASSET_ROOT}/piper/piper_phonemize.data`,
piperWasm: `${ASSET_ROOT}/piper/piper_phonemize.wasm`,
},