supertonic 3

This commit is contained in:
haeon
2026-05-06 23:09:06 +02:00
parent 6fc89ea89e
commit 0a98c9f127
47 changed files with 530 additions and 411 deletions

View File

@@ -5,7 +5,7 @@ import * as ort from 'onnxruntime-node';
const __filename = fileURLToPath(import.meta.url);
const AVAILABLE_LANGS = ["en", "ko", "es", "pt", "fr"];
const AVAILABLE_LANGS = ["en", "ko", "ja", "ar", "bg", "cs", "da", "de", "el", "es", "et", "fi", "fr", "hi", "hr", "hu", "id", "it", "lt", "lv", "nl", "pl", "pt", "ro", "ru", "sk", "sl", "sv", "tr", "uk", "vi"];
/**
* Unicode text processor
@@ -275,7 +275,7 @@ class TextToSpeech {
if (style.ttl.dims[0] !== 1) {
throw new Error('Single speaker text to speech only supports single style');
}
const maxLen = lang === 'ko' ? 120 : 300;
const maxLen = (lang === 'ko' || lang === 'ja') ? 120 : 300;
const textList = chunkText(text, maxLen);
let wavCat = null;
let durCat = 0;