Add WebAssembly (WASM) for speech enhancement GTCRN models (#2002)

This commit is contained in:
Fangjun Kuang
2025-03-13 18:35:03 +08:00
committed by GitHub
parent 6a97f8adcf
commit d320fdf65e
29 changed files with 1175 additions and 161 deletions

View File

@@ -263,7 +263,7 @@ function initSherpaOnnxOfflineTtsModelConfig(config, Module) {
const providerLen = Module.lengthBytesUTF8(config.provider || 'cpu') + 1;
const buffer = Module._malloc(providerLen);
Module.stringToUTF8(config.provider, buffer, providerLen);
Module.stringToUTF8(config.provider || 'cpu', buffer, providerLen);
Module.setValue(ptr + offset, buffer, 'i8*');
offset += 4;