echogarden 2.0.13 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/data/lexicons/heteronyms.en.json +45 -3
- package/data/schemas/options.json +64 -0
- package/dist/api/Synthesis.d.ts +10 -1
- package/dist/api/Synthesis.js +76 -9
- package/dist/api/Synthesis.js.map +1 -1
- package/dist/recognition/WhisperSTT.js +7 -4
- package/dist/recognition/WhisperSTT.js.map +1 -1
- package/dist/synthesis/GnuSpeechTTS.d.ts +12 -0
- package/dist/synthesis/GnuSpeechTTS.js +36 -0
- package/dist/synthesis/GnuSpeechTTS.js.map +1 -0
- package/dist/synthesis/KokoroTTS.d.ts +22 -0
- package/dist/synthesis/KokoroTTS.js +595 -0
- package/dist/synthesis/KokoroTTS.js.map +1 -0
- package/dist/synthesis/OpenAICloudTTS.js +15 -0
- package/dist/synthesis/OpenAICloudTTS.js.map +1 -1
- package/dist/synthesis/VitsTTS.js +6 -1
- package/dist/synthesis/VitsTTS.js.map +1 -1
- package/dist/utilities/FileReader.js +1 -1
- package/dist/utilities/PackageManager.js +4 -0
- package/dist/utilities/PackageManager.js.map +1 -1
- package/dist/utilities/Utilities.d.ts +1 -0
- package/dist/utilities/Utilities.js +8 -0
- package/dist/utilities/Utilities.js.map +1 -1
- package/dist/utilities/WasmMemoryManager.d.ts +1 -1
- package/docs/Development.md +1 -1
- package/docs/Engines.md +4 -1
- package/docs/Licenses.md +2 -1
- package/docs/Options.md +9 -5
- package/docs/Tasklist.md +1 -1
- package/package.json +14 -13
- package/src/api/Synthesis.ts +132 -10
- package/src/recognition/WhisperSTT.ts +8 -4
- package/src/synthesis/GnuSpeechTTS.ts +40 -0
- package/src/synthesis/KokoroTTS.ts +693 -0
- package/src/synthesis/OpenAICloudTTS.ts +15 -0
- package/src/synthesis/VitsTTS.ts +6 -1
- package/src/utilities/FileReader.ts +1 -1
- package/src/utilities/PackageManager.ts +5 -0
- package/src/utilities/Utilities.ts +10 -0
package/src/synthesis/VitsTTS.ts
CHANGED
|
@@ -156,7 +156,12 @@ export class VitsTTS {
|
|
|
156
156
|
const scalesTensor = new Onnx.Tensor('float32', [metadata.inference.noise_scale, lengthScale, metadata.inference.noise_w], [3])
|
|
157
157
|
const speakerIdTensor = new Onnx.Tensor('int64', new BigInt64Array([BigInt(speakerId)]), [1])
|
|
158
158
|
|
|
159
|
-
const modelInputs = {
|
|
159
|
+
const modelInputs = {
|
|
160
|
+
input: inputTensor,
|
|
161
|
+
input_lengths: inputLengthsTensor,
|
|
162
|
+
scales: scalesTensor,
|
|
163
|
+
sid: speakerIdTensor
|
|
164
|
+
}
|
|
160
165
|
|
|
161
166
|
const modelResults = await this.session!.run(modelInputs)
|
|
162
167
|
const modelOutput = modelResults['output']
|
|
@@ -126,6 +126,11 @@ const packageVersionTagResolutionLookup: { [packageName: string]: string } = {
|
|
|
126
126
|
'vits-en_GB-cori-medium': '20241001',
|
|
127
127
|
'vits-cy_GB-gwryw_gogleddol-medium': '20241001',
|
|
128
128
|
|
|
129
|
+
// Kokoro models
|
|
130
|
+
'kokoro-82m-v1.0-fp32': '20250209',
|
|
131
|
+
'kokoro-82m-v1.0-quantized': '20250209',
|
|
132
|
+
'kokoro-82m-v1.0-voices': '20250209',
|
|
133
|
+
|
|
129
134
|
// Whisper (integrated engine) models
|
|
130
135
|
'whisper-tiny': '20231126',
|
|
131
136
|
'whisper-tiny.en': '20231126',
|
|
@@ -495,3 +495,13 @@ export async function isWasmSimdSupported() {
|
|
|
495
495
|
|
|
496
496
|
return wasmFeatureDetect.simd()
|
|
497
497
|
}
|
|
498
|
+
|
|
499
|
+
export function indexOfLastMatchingNumberInRange(values: number[], targetValue: number, startIndex: number, endIndex: number) {
|
|
500
|
+
for (let i = endIndex - 1; i >= startIndex; i--) {
|
|
501
|
+
if (values[i] === targetValue) {
|
|
502
|
+
return i
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
return -1
|
|
507
|
+
}
|