echogarden 3.2.0 → 3.4.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.
Files changed (42) hide show
  1. package/README.md +5 -0
  2. package/dist/api/Synthesis.d.ts.map +1 -1
  3. package/dist/api/Synthesis.js +31 -21
  4. package/dist/api/Synthesis.js.map +1 -1
  5. package/dist/nlp/TextNormalizer.js +1 -1
  6. package/dist/nlp/TextNormalizer.js.map +1 -1
  7. package/dist/synthesis/EspeakTTS.d.ts.map +1 -1
  8. package/dist/synthesis/EspeakTTS.js +20 -5
  9. package/dist/synthesis/EspeakTTS.js.map +1 -1
  10. package/dist/utilities/Timer.d.ts +7 -3
  11. package/dist/utilities/Timer.d.ts.map +1 -1
  12. package/dist/utilities/Timer.js +42 -30
  13. package/dist/utilities/Timer.js.map +1 -1
  14. package/docs/API.md +51 -34
  15. package/docs/CLI.md +41 -6
  16. package/docs/Contributing.md +1 -1
  17. package/docs/Development.md +22 -18
  18. package/docs/Engines.md +0 -1
  19. package/docs/Licenses.md +2 -0
  20. package/docs/Options.md +56 -4
  21. package/docs/Releases.md +45 -14
  22. package/docs/Server.md +14 -5
  23. package/docs/Tasklist.md +37 -1
  24. package/docs/Technical.md +1 -0
  25. package/package.json +16 -14
  26. package/src/api/Synthesis.ts +39 -27
  27. package/src/nlp/TextNormalizer.ts +1 -2
  28. package/src/synthesis/EspeakTTS.ts +21 -6
  29. package/src/utilities/Timer.ts +57 -37
  30. package/tsconfig.json +51 -53
  31. package/dist/encodings/HtmlEscape.d.ts +0 -2
  32. package/dist/encodings/HtmlEscape.d.ts.map +0 -1
  33. package/dist/encodings/HtmlEscape.js +0 -30
  34. package/dist/encodings/HtmlEscape.js.map +0 -1
  35. package/dist/encodings/LEB128.d.ts +0 -2
  36. package/dist/encodings/LEB128.d.ts.map +0 -1
  37. package/dist/encodings/LEB128.js +0 -2
  38. package/dist/encodings/LEB128.js.map +0 -1
  39. package/dist/utilities/StringBuilder.d.ts +0 -11
  40. package/dist/utilities/StringBuilder.d.ts.map +0 -1
  41. package/dist/utilities/StringBuilder.js +0 -39
  42. package/dist/utilities/StringBuilder.js.map +0 -1
@@ -3,6 +3,7 @@
3
3
  Here's a quick guide on how to set up a development environment for making and testing changes to the Echogarden codebase.
4
4
 
5
5
  **Related pages**:
6
+
6
7
  * [How to help](Contributing.md)
7
8
  * [Technical overview](Technical.md)
8
9
  * [Node.js API reference](API.md)
@@ -20,33 +21,32 @@ Here's a quick guide on how to set up a development environment for making and t
20
21
  Create the `.vscode` subdirectory at the project base directory
21
22
 
22
23
  Add a `.vscode/tasks.json` file to run the TypeScript compiler in watch mode:
24
+
23
25
  ```json
24
26
  {
25
27
  "version": "2.0.0",
26
- "command": "tsc.cmd",
27
- "args": [
28
- "-w",
29
- "-p",
30
- "."
31
- ],
32
- "problemMatcher": "$tsc-watch",
33
- "isBackground": true,
34
28
  "tasks": [
35
29
  {
36
- "label": "node",
37
- "type": "shell",
38
- "command": "tsc",
39
- "args": [
40
- "-w",
41
- "-p",
42
- "."
30
+ "label": "tsc: watch",
31
+ "type": "typescript",
32
+ "tsconfig": "tsconfig.json",
33
+ "option": "watch",
34
+ "problemMatcher": [
35
+ "$tsc-watch"
43
36
  ],
44
- "isBackground": true,
45
- "problemMatcher": "$tsc-watch",
46
37
  "group": {
47
38
  "kind": "build",
48
39
  "isDefault": true
49
40
  },
41
+ "runOptions": {
42
+ "runOn": "folderOpen",
43
+ "instanceLimit": 1,
44
+ "instancePolicy": "silent"
45
+ },
46
+ "presentation": {
47
+ "reveal": "never",
48
+ "focus": false
49
+ }
50
50
  }
51
51
  ]
52
52
  }
@@ -82,7 +82,11 @@ Add a `.vscode/launch.json` file to launch the CLI in debug mode:
82
82
  "program": "${workspaceFolder}/dist/cli/CLIStarter.js",
83
83
  "outputCapture": "std",
84
84
  "console": "integratedTerminal",
85
- "runtimeArgs": ["--experimental-wasi-unstable-preview1", "--no-warnings", "--trace-uncaught"],
85
+ "runtimeArgs": [
86
+ "--experimental-wasi-unstable-preview1",
87
+ "--no-warnings",
88
+ "--trace-uncaught"
89
+ ],
86
90
 
87
91
  "args": ["speak", "Hello World!", "--debug"]
88
92
  }
package/docs/Engines.md CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  # Available engines
3
2
 
4
3
  ## Text-to-speech
package/docs/Licenses.md CHANGED
@@ -26,6 +26,7 @@
26
26
  A large variety of voices, models and binaries are served from the repository.
27
27
 
28
28
  All are freely distributable, with varying licenses:
29
+
29
30
  * Kokoro model and voices (`kokoro-`) [Apache License 2.0](https://huggingface.co/hexgrad/Kokoro-82M)
30
31
  * Flite voices (`flite-`): [BSD License](https://github.com/festvox/flite/blob/master/COPYING)
31
32
  * SVOX Pico resources (`pico-`): [Apache License 2.0](https://github.com/gmn/nanotts/blob/master/LICENSE)
@@ -36,5 +37,6 @@ All are freely distributable, with varying licenses:
36
37
  * NSNet2: [Attribution 4.0 International](https://github.com/NeonGeckoCom/nsnet2-denoiser/blob/main/LICENSE)
37
38
 
38
39
  Tool binary distributions
40
+
39
41
  * FFmpeg: [LGPL, GPL v2 and GPL v3 Licenses](https://github.com/FFmpeg/FFmpeg)
40
42
  * whisper.cpp: [MIT License](https://github.com/ggerganov/whisper.cpp/blob/master/LICENSE)
package/docs/Options.md CHANGED
@@ -3,6 +3,7 @@
3
3
  Here's a detailed reference for all the options accepted by the Echogarden CLI and API.
4
4
 
5
5
  **Related pages**:
6
+
6
7
  * [List of all supported engines](Engines.md)
7
8
  * [Quick guide to the command line interface](CLI.md)
8
9
  * [Node.js API reference](API.md)
@@ -12,6 +13,7 @@ Here's a detailed reference for all the options accepted by the Echogarden CLI a
12
13
  Applies to CLI operations: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`, API method: `synthesize`
13
14
 
14
15
  **General**:
16
+
15
17
  * `engine`: identifier of the synthesis engine to use. Can be `kokoro`, `vits`, `pico`, `flite`, `gnuspeech`, `espeak`, `sam`, `sapi`, `msspeech`, `coqui-server`, `google-cloud`, `microsoft-azure`, `amazon-polly`, `openai-cloud`, `elevenlabs`, `google-translate` or `microsoft-edge` (see [the engines documentation page](Engines.md) for more detailed information about each engine). Auto-selected if not set
16
18
  * `language`: language code, can be ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)), like `en`, `fr`, `en-US`, `pt-BR`, etc. [ISO 639-3](https://en.wikipedia.org/wiki/ISO_639-3), or a plain language name like `french`. Auto-detected if not set
17
19
  * `voice`: name of the voice to use. Can be a search string. Auto-selected if not set
@@ -29,10 +31,12 @@ Applies to CLI operations: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`
29
31
  * `languageDetection`: prefix to provide options for text language detection. Options detailed in section for text language detection
30
32
 
31
33
  **Plain text processing**:
34
+
32
35
  * `plainText.paragraphBreaks`: split to paragraphs based on single (`single`), or double (`double`) line breaks. Defaults to `double`
33
36
  * `plainText.whitespace`: determines how to process whitespace within paragraphs. Can be `preserve` (leave as is), `removeLineBreaks` (convert line breaks to spaces) or `collapse` (convert runs of whitespace characters, including line breaks, to a single space character). Defaults to `preserve`
34
37
 
35
38
  **Post-processing**:
39
+
36
40
  * `postProcessing.normalizeAudio`: should normalize output audio. Defaults to `true`
37
41
  * `postProcessing.targetPeak`: target peak (decibels) for normalization. Defaults to `-3`
38
42
  * `postProcessing.maxGainIncrease`: max gain increase (decibels) when performing normalization. Defaults to `30`
@@ -42,55 +46,67 @@ Applies to CLI operations: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`
42
46
  * `postProcessing.rubberband`: prefix for RubberBand options (TODO: document options)
43
47
 
44
48
  **Output audio format**:
49
+
45
50
  * `outputAudioFormat.codec`: Codec identifier (**Note**: API only. CLI uses file extensions instead), can be `wav`, `mp3`, `opus`, `m4a`, `ogg`, `flac`. Leaving as `undefined` would return a raw audio structure (see more information at the [API documentation](API.md]). Optional
46
- * `outputAudioFormat.bitrate`: Custom bitrate for encoding, applies only to `mp3`, `opus`, `m4a`, `ogg`. By default, bitrates are selected between 48Kbps and 64Kbps, to provide a good speech quality while minimizing file size. Optional
51
+ * `outputAudioFormat.bitrate`: Custom bitrate for encoding, applies only to `mp3`, `opus`, `m4a`, `ogg`. By default, bitrates are selected between 48Kbps and 64Kbps, to provide a good speech quality while minimizing file size. Optional
47
52
 
48
53
  **Kokoro**:
54
+
49
55
  * `kokoro.model`: model variant to use. Can be `82m-v1.0-fp32` or `82m-v1.0-quantized`. **Note**: the quantized model, while having lower memory usage, is significantly slower than the non-quantized (FP32) one. Defaults to `v1.0-fp32`
50
56
  * `kokoro.provider`: ONNX execution provider to use. Can be `cpu`, `dml` (Windows only, uses [DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration), or `cuda` (Linux only, requires system-wide installation of CUDA and cuDNN SDKs, see [this guide](./CUDA.md) for more detailed information). **Note**: `dml` provider (DirectML) seems to currently fail on inference. The cause for this error is [still under investigation](https://github.com/echogarden-project/echogarden/issues/94). Defaults to `cpu`
51
57
 
52
58
  **VITS**:
59
+
53
60
  * `vits.speakerId`: speaker ID, for VITS models that support multiple speakers. Defaults to `0`
54
61
  * `vits.provider`: ONNX execution provider to use. Can be `cpu`, `dml` (Windows only, uses [DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration), or `cuda` (Linux only, requires system-wide installation of CUDA and cuDNN SDKs, see [this guide](./CUDA.md) for more detailed information). Using GPU acceleration for VITS may or may not be faster than CPU, depending on your hardware. Defaults to `cpu`
55
62
 
56
63
  **eSpeak**:
64
+
57
65
  * `espeak.rate`: speech rate, in eSpeak units. Overrides `speed` when set
58
66
  * `espeak.pitch`: pitch, in eSpeak units. Overrides `pitch` when set
59
67
  * `espeak.pitchRange`: pitch range, in eSpeak units. Overrides `pitchVariation` when set
60
68
  * `espeak.useKlatt`: use the Klatt synthesis method. Defaults to `false`
61
69
 
62
70
  **SAM**:
71
+
63
72
  * `sam.pitch`: pitch value, between `0`..`255`. Overrides `pitch` when set
64
73
  * `sam.speed`: speed value, between `0`..`255`. Overrides `speed` when set
65
74
  * `sam.mouth`: mouth value, between `0`..`255` (defaults to `128`)
66
75
  * `sam.throat`: throat value, between `0`..`255` (defaults to `128`)
67
76
 
68
77
  **Gnuspeech**
78
+
69
79
  * `gnuspeech.tempo`: controls speech rate. Defaults to the value of the general `speed` option (`1.0` by default)
70
80
  * `gnuspeech.controlRate`: control rate. Defaults to `250.0`
71
81
 
72
82
  **SAPI**:
83
+
73
84
  * `sapi.rate`: SAPI speech rate, in its native units. An integer number between `-10` and `10`. Setting `speed` would apply time stretching instead. The two options can be used together
74
85
 
75
86
  **Microsoft Speech Platform**:
87
+
76
88
  * `msspeech.rate`: same units and effects as the SAPI speech rate
77
89
 
78
90
  **Coqui Server**:
91
+
79
92
  * `coquiServer.serverUrl`: server URL
80
93
  * `coquiServer.speakerId`: speaker ID (if applicable)
81
94
 
82
95
  **Google Cloud**:
96
+
83
97
  * `googleCloud.apiKey`: API key (required)
84
98
  * `googleCloud.pitchDeltaSemitones`: pitch delta in semitones. Overrides `pitch` when set
85
99
  * `googleCloud.customVoice.model`: name of custom voice
86
100
  * `googleCloud.customVoice.reportedUsage`: reported usage of custom voice
87
101
 
88
102
  **Azure Cognitive Services**:
103
+
89
104
  * `microsoftAzure.subscriptionKey`: subscription key (required)
90
105
  * `microsoftAzure.serviceRegion`: service region (required)
91
106
  * `microsoftAzure.pitchDeltaHz`: pitch delta in Hz. Overrides `pitch` when set
92
107
 
93
108
  **Amazon Polly**:
109
+
94
110
  * `amazonPolly.region`: region (required)
95
111
  * `amazonPolly.accessKeyId`: access key ID (required)
96
112
  * `amazonPolly.secretAccessKey`: secret access key (required)
@@ -98,6 +114,7 @@ Applies to CLI operations: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`
98
114
  * `amazonPolly.lexiconNames`: an array of lexicon names. Optional
99
115
 
100
116
  **OpenAI Cloud**:
117
+
101
118
  * `openAICloud.apiKey`: API key (required)
102
119
  * `openAICloud.organization`: organization identifier. Optional
103
120
  * `openAICloud.baseURL`: override the default base URL for the API. Optional
@@ -107,6 +124,7 @@ Applies to CLI operations: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`
107
124
  * `openAICloud.maxRetries`: maximum retries on failure. Defaults to 10
108
125
 
109
126
  **Elevenlabs**:
127
+
110
128
  * `elevenLabs.apiKey`: API key (required)
111
129
  * `elevenLabs.modelId`: model ID. See [this page](https://elevenlabs.io/docs/models) for an up-to-date list of available models. Defaults to `eleven_multilingual_v2`
112
130
  * `elevenLabs.stability`: stability. Defaults to `0.5`
@@ -116,12 +134,15 @@ Applies to CLI operations: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`
116
134
  * `elevenLabs.seed`: seed for generation. Integer value that can make the generation predictable. Optional
117
135
 
118
136
  **Deepgram**:
137
+
119
138
  * `deepgram.apiKey`: API key (required)
120
139
 
121
140
  **Google Translate**:
141
+
122
142
  * `googleTranslate.tld`: top level domain to connect to. Can change the dialect for a small number of voices. For example `us` gives American English for `en`, while `com` gives British English for `en`. Defaults to `us`
123
143
 
124
144
  **Microsoft Edge**:
145
+
125
146
  * `microsoftEdge.trustedClientToken`: trusted client token (required). A special token required to use the service
126
147
  * `microsoftEdge.pitchDeltaHz`: pitch delta in Hz. Overrides `pitch` when set
127
148
 
@@ -130,11 +151,13 @@ Applies to CLI operations: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`
130
151
  Applies to CLI operation: `list-voices`, API method: `requestVoiceList`
131
152
 
132
153
  **General**:
154
+
133
155
  * `language`: language code to filter by. Optional
134
156
  * `voice`: name or name pattern to filter by. Optional
135
157
  * `voiceGender`: gender to filter by. Optional
136
158
 
137
159
  Also accepted are the following engine-specific options that may be required in order to retrieve the voice list:
160
+
138
161
  * `googleCloud.apiKey`
139
162
  * `microsoftAzure.subscriptionKey`, `microsoftAzure.serviceRegion`
140
163
  * `amazonPolly.region`, `amazonPolly.accessKeyId`, `amazonPolly.secretAccessKey`
@@ -146,6 +169,7 @@ Also accepted are the following engine-specific options that may be required in
146
169
  Applies to CLI operation: `transcribe`, API method: `recognize`
147
170
 
148
171
  **General**:
172
+
149
173
  * `engine`: identifier of the recognition engine to use, can be `whisper`, `whisper.cpp`, `google-cloud`, `microsoft-azure`, `amazon-transcribe`, `openai-cloud`, `deepgram` (see [the full engine list](Engines.md) for more detailed information)
150
174
  * `language`: language code ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)) for the audio, like `en`, `fr`, `de`. Auto-detected if not set
151
175
  * `crop`: crop to active parts using voice activity detection before starting recognition. Defaults to `true`
@@ -157,7 +181,8 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
157
181
  * `sourceSeparation`: prefix to provide options for source separation when `isolate` is set to `true`. Options detailed in section for source separation
158
182
 
159
183
  **Whisper**:
160
- * `whisper.model`: selects which Whisper model to use. Can be `tiny`, `tiny.en`, `base`, `base.en`, `small`, `small.en`, `medium`, `medium.en`, `large` (same as `large-v2`), `large-v1`, `large-v2`, `large-v3`, `large-v3-turbo`. The following quantized models are also supported: `tiny-q5_1`,`tiny-q8_0`, `tiny.en-q5_1`, `tiny.en-q8_0`,`base-q5_1`, `base-q8_0`, `base.en-q5_1`, `base.en-q8_0`,`small-q5_1`, `small.en-q5_1`, `small.en-q8_0`,`medium-q5_0`, `medium.en-q5_0`, `medium.en-q8_0`, `large-v2-q5_0`, `large-v2-q8_0`, `large-v3-q5_0`, `large-v3-turbo-q5_0`, `large-v3-turbo-q8_0`. Defaults to `base` or `base.en` for English
184
+
185
+ * `whisper.model`: selects which Whisper model to use. Can be `tiny`, `tiny.en`, `base`, `base.en`, `small`, `small.en`, `medium`, `medium.en`, `large` (same as `large-v2`), `large-v1`, `large-v2`, `large-v3`, `large-v3-turbo`. The following quantized models are also supported: `tiny-q5_1`,`tiny-q8_0`, `tiny.en-q5_1`, `tiny.en-q8_0`,`base-q5_1`, `base-q8_0`, `base.en-q5_1`, `base.en-q8_0`,`small-q5_1`, `small.en-q5_1`, `small.en-q8_0`,`medium-q5_0`, `medium.en-q5_0`, `medium.en-q8_0`, `large-v2-q5_0`, `large-v2-q8_0`, `large-v3-q5_0`, `large-v3-turbo-q5_0`, `large-v3-turbo-q8_0`. Defaults to `base` or `base.en` for English
161
186
  * `whisper.enableGPU`: enable GPU processing. Setting to `true` will try to use a CUDA build, if available for your architecture (currently CUDA 12.4 builds are available for Windows x64 and Linux x64).
162
187
  * `whisper.threadCount`: number of threads to use, defaults to `4`
163
188
  * `whisper.gpuDeviceIndex`: GPU device index (if GPU is enabled), defaults to `0`
@@ -174,6 +199,7 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
174
199
  * `whisper.seed`: provide a custom random seed for token selection when temperature is greater than 0. Uses a constant seed by default to ensure reproducibility
175
200
 
176
201
  **Whisper.cpp CLI**:
202
+
177
203
  * `whisperCpp.model`: selects which `whisper.cpp` model to use. Model identifiers and defaults are identical to those in the `whisper` engine
178
204
  * `whisperCpp.executablePath`: a path to a custom `whisper.cpp` `whisper-cli` executable (currently required for macOS)
179
205
  * `whisperCpp.build`: type of `whisper.cpp` build to use. Can be set to `cpu`, `cublas-12.4.0` or `custom`. By default, builds are auto-selected and downloaded for Windows x64 and Linux x64 (for both `cpu` and `cublas-12.4.0`). The Linux CUDA build requires a [system-wide installation of CUDA Toolkit 12.4+](https://developer.nvidia.com/cuda-downloads), available on path. Using other builds requires providing a custom `executablePath`, which will automatically set this option to `custom`
@@ -191,6 +217,7 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
191
217
  * `whisperCpp.verbose`: show all CLI messages during execution. Defaults to `false`
192
218
 
193
219
  **Google Cloud**:
220
+
194
221
  * `googleCloud.apiKey`: Google Cloud API key (required)
195
222
  * `googleCloud.alternativeLanguageCodes`: An array of alternative language codes. Optional
196
223
  * `googleCloud.profanityFilter`: censor profanity. Defaults to `false`
@@ -198,15 +225,18 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
198
225
  * `googleCloud.useEnhancedModel`: use enhanced model. Defaults to `true`
199
226
 
200
227
  **Azure Cognitive Services**:
228
+
201
229
  * `microsoftAzure.subscriptionKey`: subscription key (required)
202
230
  * `microsoftAzure.serviceRegion`: service region (required)
203
231
 
204
232
  **Amazon Transcribe**:
233
+
205
234
  * `amazonTranscribe.region`: region (required)
206
235
  * `amazonTranscribe.accessKeyId`: access key ID (required)
207
236
  * `amazonTranscribe.secretAccessKey`: secret access key (required)
208
237
 
209
238
  **OpenAI Cloud**:
239
+
210
240
  * `openAICloud.apiKey`: API key (required)
211
241
  * `openAICloud.model`: model to use. When using the default provider (OpenAI), can be `whisper-1`, `gpt-4o-mini-transcribe` or `gpt-4o-transcribe`. For a custom provider, like Groq, see its documentation
212
242
  * `openAICloud.organization`: organization identifier. Optional
@@ -218,6 +248,7 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
218
248
  * `openAICloud.requestWordTimestamps`: request word timestamps from the server. Defaults to `true` for the default OpenAI endpoint, and `false` if a custom one is set using `baseURL`
219
249
 
220
250
  **Deepgram**:
251
+
221
252
  * `deepgram.apiKey`: API key (required)
222
253
  * `deepgram.model`: model to use. Can be any model the server supports, like `nova-3`, `nova-2`, `nova`, `enhanced`, `base` or `whisper` (see model list [here](https://developers.deepgram.com/docs/model)). Defaults to `nova-3`
223
254
  * `deepgram.punctuate`: request to add punctuation and capitalization to the resulting transcript. Defaults to `true`
@@ -227,6 +258,7 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
227
258
  Applies to CLI operation: `align`, API method: `align`
228
259
 
229
260
  **General**:
261
+
230
262
  * `engine`: alignment algorithm to use, can be `dtw`, `dtw-ra` or `whisper`. Defaults to `dtw`
231
263
  * `language`: language code for the audio and transcript ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)), like `en`, `fr`, `en-US`, `pt-BR`. Auto-detected from transcript if not set
232
264
  * `crop`: crop to active parts using voice activity detection before starting. Defaults to `true`
@@ -237,14 +269,17 @@ Applies to CLI operation: `align`, API method: `align`
237
269
  * `sourceSeparation`: prefix to provide options for source separation when `isolate` is set to `true`. Options detailed in section for source separation
238
270
 
239
271
  **Plain text processing**:
272
+
240
273
  * `plainText.paragraphBreaks`: split transcript to paragraphs based on single (`single`), or double (`double`) line breaks. Defaults to `double`
241
274
  * `plainText.whitespace`: determines how to process whitespace within transcript paragraphs. Can be `preserve` (leave as is), `removeLineBreaks` (convert line breaks to spaces) or `collapse` (convert runs of whitespace characters, including line breaks, to a single space character). Defaults to `preserve`
242
275
 
243
276
  **DTW**:
277
+
244
278
  * `dtw.granularity`: adjusts the MFCC frame width and hop size based on the profile selected. Can be set to either `xx-low` (400ms width, 160ms hop), `x-low` (200ms width, 80ms hop), `low` (100ms width, 40ms hop), `medium` (50ms width, 20ms hop), `high` (25ms width, 10ms hop), `x-high` (20ms width, 5ms hop). For multi-pass processing, multiple granularities can be provided, like `dtw.granularity=['xx-low','medium']`. Auto-selected by default.
245
- * `dtw.windowDuration`: sets the maximum duration of the Sakoe-Chiba window when performing DTW alignment. The value can be specified in seconds, like `240`, or as an integer percentage (formatted like `15%`), relative to the total duration of the source audio. The estimated memory requirement is shown in the log before alignment starts. Recommended to be set to at least 10% - 20% of total audio duration. For multi-pass processing, multiple durations can be provided (which can mix absolute and relative values), like `dtw.windowDuration=['15%',20]`. Auto-selected by default
279
+ * `dtw.windowDuration`: sets the maximum duration of the Sakoe-Chiba window when performing DTW alignment. The value can be specified in seconds, like `240`, or as an integer percentage (formatted like `15%`), relative to the total duration of the source audio. The estimated memory requirement is shown in the log before alignment starts. Recommended to be set to at least 10% - 20% of total audio duration. For multi-pass processing, multiple durations can be provided (which can mix absolute and relative values), like `dtw.windowDuration=['15%',20]`. Auto-selected by default
246
280
 
247
281
  **DTW-RA**:
282
+
248
283
  * `recognition`: prefix to provide recognition options when using `dtw-ra` method, for example: setting `recognition.engine = whisper` and `recognition.whisper.model = base.en`
249
284
  * `dtw.phoneAlignmentMethod`: algorithm to use when aligning phones: can either be set to `dtw` or `interpolation`. Defaults to `dtw`
250
285
 
@@ -265,6 +300,7 @@ Applies to the `whisper` engine only. To provide Whisper options for `dtw-ra`, u
265
300
  Applies to CLI operation: `translate-speech`, API method: `translateSpeech`
266
301
 
267
302
  **General**:
303
+
268
304
  * `engine`: Can be `whisper`, `whisper.cpp` or `openai-cloud`. Defaults to `whisper`
269
305
  * `sourceLanguage`: the source language code for the input speech. Auto-detected if not set
270
306
  * `targetLanguage`: the target language code for the output speech. Only `en` (English) supported by the `whisper` engine. Optional
@@ -291,6 +327,7 @@ Applies to CLI operation: `translate-speech`, API method: `translateSpeech`
291
327
  Applies to CLI operation: `translate-text`, API method: `translateText`
292
328
 
293
329
  **General**:
330
+
294
331
  * `engine`: only `google-translate` supported
295
332
  * `sourceLanguage`: the source language code for the input text. Auto-detected if not set
296
333
  * `targetLanguage`: the target language code for the output text. Required
@@ -298,6 +335,7 @@ Applies to CLI operation: `translate-text`, API method: `translateText`
298
335
  * `plainText`: plain text processing options. Optional
299
336
 
300
337
  **Google Translate**:
338
+
301
339
  * `googleTranslate.tld`: top-level domain to request from. Defaults to `com`
302
340
  * `googleTranslate.maxCharactersPerPart`: maximum number of characters in each part requested from the server. Defaults to 2000
303
341
 
@@ -306,6 +344,7 @@ Applies to CLI operation: `translate-text`, API method: `translateText`
306
344
  Applies to CLI operation: `align-translation`, API method: `alignTranslation`
307
345
 
308
346
  **General**:
347
+
309
348
  * `engine`: alignment algorithm to use, can only be `whisper`. Defaults to `whisper`
310
349
  * `sourceLanguage`: language code for the source audio ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)), like `en`, `fr`, `zh`, etc. Auto-detected from audio if not set
311
350
  * `targetLanguage`: language code for the translated transcript. Can only be `en` for now. Defaults to `en`
@@ -316,6 +355,7 @@ Applies to CLI operation: `align-translation`, API method: `alignTranslation`
316
355
  * `sourceSeparation`: prefix to provide options for source separation when `isolate` is set to `true`. Options detailed in section for source separation
317
356
 
318
357
  **Whisper**:
358
+
319
359
  * `whisper.model`: Whisper model to use. Only multilingual models can be used. Defaults to `base`
320
360
  * `whisper.enableGPU`: enable whisper GPU build. See details in recognition section above
321
361
  * `whisper.threadCount`: number of threads to use, defaults to `4`
@@ -327,6 +367,7 @@ Applies to CLI operation: `align-translation`, API method: `alignTranslation`
327
367
  Applies to CLI operation: `align-transcript-and-translation`, API method: `alignTranscriptAndTranslation`
328
368
 
329
369
  **General**:
370
+
330
371
  * `engine`: can only be `two-stage`. Defaults to `two-stage`
331
372
  * `sourceLanguage`: language code for the source audio ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)), like `en`, `fr`, `zh`, etc. Auto-detected from audio if not set
332
373
  * `targetLanguage`: language code for the translated transcript. Can only be `en` for now. Defaults to `en`
@@ -343,6 +384,7 @@ Applies to CLI operation: `align-transcript-and-translation`, API method: `align
343
384
  Applies to CLI operation: `align-timeline-translation`, API method: `alignTimelineTranslation`
344
385
 
345
386
  **General**:
387
+
346
388
  * `engine`: alignment engine to use. Can only be `e5`. Defaults to `e5`
347
389
  * `sourceLanguage`: language code for the source timeline. Auto-detected from timeline if not set
348
390
  * `targetLanguage`: language code for the translated transcript. Auto-detected if not set
@@ -351,6 +393,7 @@ Applies to CLI operation: `align-timeline-translation`, API method: `alignTimeli
351
393
  * `subtitles`: prefix to provide options for subtitles. Options detailed in section for subtitles
352
394
 
353
395
  **E5**:
396
+
354
397
  * `e5.model`: E5 model to use. Defaults to `e5-small-fp16` (support for additional models will be added in the future)
355
398
 
356
399
  ## Language detection
@@ -360,6 +403,7 @@ Applies to CLI operation: `align-timeline-translation`, API method: `alignTimeli
360
403
  Applies to CLI operation: `detect-speech-langauge`, API method: `detectSpeechLangauge`
361
404
 
362
405
  **General**:
406
+
363
407
  * `engine`: `whisper` or `silero`. Defaults to `whisper`
364
408
  * `defaultLanguage`: language to fallback to when confidence for top candidate of is low. Defaults to `en`
365
409
  * `fallbackThresholdProbability`: confidence threshold to cause fallback. Defaults to `0.05`
@@ -367,6 +411,7 @@ Applies to CLI operation: `detect-speech-langauge`, API method: `detectSpeechLan
367
411
  * `vad`: prefix to provide options for voice activity detection when `crop` is set to `true`. Options detailed in section for voice activity detection
368
412
 
369
413
  **Whisper**:
414
+
370
415
  * `whisper.model`: Whisper model to use. See model list in the recognition section. Defaults to `tiny`
371
416
  * `whisper.enableGPU`: enable whisper GPU build. See details in recognition section above
372
417
  * `whisper.threadCount`: number of threads to use, defaults to `4`
@@ -374,6 +419,7 @@ Applies to CLI operation: `detect-speech-langauge`, API method: `detectSpeechLan
374
419
  * `whisper.temperature`: impacts the distribution of candidate languages when applying the softmax function to compute language probabilities over the model output. Higher temperature causes the distribution to be more uniform, while lower temperature causes it to be more strongly weighted towards the best scoring candidates. Defaults to `1.0`
375
420
 
376
421
  **Silero**:
422
+
377
423
  * `silero.provider`: ONNX execution provider to use. Can be `cpu`, `dml` (Windows only, uses [DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration), or `cuda` (Linux only, requires system-wide installation of CUDA and cuDNN SDKs, see [this guide](./CUDA.md) for more detailed information). Using GPU may be faster, but the initialization overhead is larger. **Note**: `dml` provider seems to be unstable at the moment for this model. Defaults to `cpu`
378
424
 
379
425
  ### Text language detection
@@ -381,6 +427,7 @@ Applies to CLI operation: `detect-speech-langauge`, API method: `detectSpeechLan
381
427
  Applies to CLI operation: `detect-text-langauge`, API method: `detectTextLangauge`
382
428
 
383
429
  **General**:
430
+
384
431
  * `engine`: `tinyld` or `fasttext`. Defaults to `tinyld`
385
432
  * `defaultLanguage`: language to fallback to when confidence for top candidate is low. Defaults to `en`
386
433
  * `fallbackThresholdProbability`: confidence threshold to cause fallback. Defaults to `0.05`
@@ -390,14 +437,17 @@ Applies to CLI operation: `detect-text-langauge`, API method: `detectTextLangaug
390
437
  Applies to CLI operation: `detect-voice-activity`, API method: `detectVoiceActivity`
391
438
 
392
439
  **General**:
440
+
393
441
  * `engine`: VAD engine to use. Can be `webrtc`, `silero`, `rnnoise`, or `adaptive-gate`. Defaults to `silero`
394
442
  * `activityThreshold`: minimum predicted probability for determining a frame as having speech activity. Defaults to `0.5`
395
443
 
396
444
  **WebRTC**:
445
+
397
446
  * `webrtc.frameDuration`: WebRTC frame duration (ms). Can be `10`, `20` or `30`. Defaults to `30`
398
447
  * `webrtc.mode`: WebRTC mode (aggressiveness). Can be `0`, `1`, `2` or `3`. Defaults to `1`
399
448
 
400
449
  **Silero**:
450
+
401
451
  * `silero.frameDuration`: Silero frame duration (ms). Can be `30`, `60` or `90`. Defaults to `90`
402
452
  * `silero.provider`: ONNX provider to use. Can be `cpu`, `dml` (Windows only, uses [DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration), or `cuda` (Linux only, requires system-wide installation of CUDA and cuDNN SDKs, see [this guide](./CUDA.md) for more detailed information). Using GPU is likely to be slower than CPU due to inference being independently executed on each audio frame. Defaults to `cpu` (recommended)
403
453
 
@@ -406,15 +456,18 @@ Applies to CLI operation: `detect-voice-activity`, API method: `detectVoiceActiv
406
456
  Applies to CLI operation: `denoise`, API method: `denoise`
407
457
 
408
458
  **General**:
459
+
409
460
  * `engine`: `rnnoise` or `nsnet2`. Defaults to `rnnoise`
410
461
 
411
462
  **Post-processing**:
463
+
412
464
  * `postProcessing.normalizeAudio`: should normalize output audio. Defaults to `false`
413
465
  * `postProcessing.targetPeak`: target peak (decibels) for normalization. Defaults to `-3`
414
466
  * `postProcessing.maxGainIncrease`: max gain increase (decibels) when performing normalization. Defaults to `30`
415
467
  * `postProcessing.dryMixGain`: gain (decibels) of dry (original) signal to mix back to the denoised (wet) signal. Defaults to `-100`
416
468
 
417
469
  **NSNet2**:
470
+
418
471
  * `nsnet2.model`: can be `baseline-16khz` or `baseline-48khz`. Defaults to `baseline-48khz`
419
472
  * `nsnet2.provider`: ONNX execution provider. Can be `cpu`, `dml` or `cuda` (**Note**: `dml` provider seems to fail with these models). Defaults to `cpu`
420
473
  * `maxAttenuation`: maximum amount of attenuation, in decibels, applied to an FFT bin when filtering the audio frames. Defaults to `30`
@@ -455,7 +508,6 @@ On the CLI, global options can be used with any operation. To set global options
455
508
  * `packageBaseURL`: sets a custom base URL for the remote package repository used to download missing packages. Default is `https://huggingface.co/echogarden/echogarden-packages/resolve/main/`. If `huggingface.co` isn't accessible in your location, you can set to use a mirror by changing `huggingface.co` to an alternative domain like `hf-mirror.com`
456
509
  * `logLevel`: adjusts the default amount of log messages shown during processing. Possible values: `silent`, `output`, `error`, `warning`, `info`, `trace`. Defaults to `info`
457
510
 
458
-
459
511
  ## CLI options
460
512
 
461
513
  These options are for the CLI only.