Commit
·
61fb80f
1
Parent(s):
6cfa0e7
update model
Browse files- sherpa-onnx-tts.js +6 -2
- sherpa-onnx-wasm-main-tts.js +0 -0
- sherpa-onnx-wasm-main-tts.wasm +2 -2
sherpa-onnx-tts.js
CHANGED
@@ -21,7 +21,7 @@ function freeConfig(config, Module) {
|
|
21 |
|
22 |
// The user should free the returned pointers
|
23 |
function initSherpaOnnxOfflineTtsVitsModelConfig(config, Module) {
|
24 |
-
const modelLen = Module.lengthBytesUTF8(config.model) + 1;
|
25 |
const lexiconLen = Module.lengthBytesUTF8(config.lexicon || '') + 1;
|
26 |
const tokensLen = Module.lengthBytesUTF8(config.tokens || '') + 1;
|
27 |
const dataDirLen = Module.lengthBytesUTF8(config.dataDir || '') + 1;
|
@@ -282,7 +282,7 @@ function initSherpaOnnxOfflineTtsModelConfig(config, Module) {
|
|
282 |
function initSherpaOnnxOfflineTtsConfig(config, Module) {
|
283 |
const modelConfig =
|
284 |
initSherpaOnnxOfflineTtsModelConfig(config.offlineTtsModelConfig, Module);
|
285 |
-
const len = modelConfig.len +
|
286 |
const ptr = Module._malloc(len);
|
287 |
|
288 |
let offset = 0;
|
@@ -303,6 +303,10 @@ function initSherpaOnnxOfflineTtsConfig(config, Module) {
|
|
303 |
offset += 4;
|
304 |
|
305 |
Module.setValue(ptr + offset, buffer + ruleFstsLen, 'i8*');
|
|
|
|
|
|
|
|
|
306 |
|
307 |
return {
|
308 |
buffer: buffer, ptr: ptr, len: len, config: modelConfig,
|
|
|
21 |
|
22 |
// The user should free the returned pointers
|
23 |
function initSherpaOnnxOfflineTtsVitsModelConfig(config, Module) {
|
24 |
+
const modelLen = Module.lengthBytesUTF8(config.model || '') + 1;
|
25 |
const lexiconLen = Module.lengthBytesUTF8(config.lexicon || '') + 1;
|
26 |
const tokensLen = Module.lengthBytesUTF8(config.tokens || '') + 1;
|
27 |
const dataDirLen = Module.lengthBytesUTF8(config.dataDir || '') + 1;
|
|
|
282 |
function initSherpaOnnxOfflineTtsConfig(config, Module) {
|
283 |
const modelConfig =
|
284 |
initSherpaOnnxOfflineTtsModelConfig(config.offlineTtsModelConfig, Module);
|
285 |
+
const len = modelConfig.len + 4 * 4;
|
286 |
const ptr = Module._malloc(len);
|
287 |
|
288 |
let offset = 0;
|
|
|
303 |
offset += 4;
|
304 |
|
305 |
Module.setValue(ptr + offset, buffer + ruleFstsLen, 'i8*');
|
306 |
+
offset += 4;
|
307 |
+
|
308 |
+
Module.setValue(ptr + offset, config.silenceScale || 0.2, 'float');
|
309 |
+
offset += 4;
|
310 |
|
311 |
return {
|
312 |
buffer: buffer, ptr: ptr, len: len, config: modelConfig,
|
sherpa-onnx-wasm-main-tts.js
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
sherpa-onnx-wasm-main-tts.wasm
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6de9336df3662743b036506b3431a86ccd33360a8465f020a1f0cc0b5b8ad35b
|
3 |
+
size 11724859
|