echogarden 0.4.3 → 0.5.1
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 +42 -26
- package/data/lexicons/heteronyms.en.json +13 -13
- package/dist/cli/CLI.js +22 -6
- package/dist/cli/CLI.js.map +1 -1
- package/dist/nlp/TextNormalizer.js +1 -1
- package/dist/nlp/TextNormalizer.js.map +1 -1
- package/dist/synthesis/VitsTTS.js +230 -65
- package/dist/synthesis/VitsTTS.js.map +1 -1
- package/dist/utilities/PackageManager.d.ts +3 -1
- package/dist/utilities/PackageManager.js +20 -16
- package/dist/utilities/PackageManager.js.map +1 -1
- package/docs/CLI.md +37 -13
- package/docs/Development.md +17 -1
- package/docs/Engines.md +29 -21
- package/docs/Licenses.md +2 -2
- package/docs/Options.md +2 -2
- package/docs/Tasklist.md +288 -0
- package/docs/Technical.md +16 -14
- package/package.json +11 -13
- package/docs/Roadmap.md +0 -14
package/docs/CLI.md
CHANGED
|
@@ -8,36 +8,47 @@ echogarden [command] [one or more inputs..] [one or more outputs...] [options...
|
|
|
8
8
|
|
|
9
9
|
Here's a quick tour of the main operations available via the CLI.
|
|
10
10
|
|
|
11
|
-
Each command accepts
|
|
11
|
+
Each command can accepts one or more options, in the form `--[optionName]=[value]` (The `=` is required). A detailed reference of all the available options can be found [here](Options.md).
|
|
12
|
+
|
|
13
|
+
While the program is running, you can press `esc` to immediately exit, or, during audio playback, `enter` to skip it.
|
|
12
14
|
|
|
13
15
|
## Text to speech
|
|
14
16
|
|
|
15
17
|
**Task**: given a text file, synthesize spoken audio for it.
|
|
16
18
|
|
|
17
|
-
|
|
18
19
|
This would synthesize "Hello World" and play the result in the terminal:
|
|
19
20
|
```bash
|
|
20
21
|
echogarden speak "Hello world!"
|
|
21
22
|
```
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
If no language is specified, it would attempt to detect it. This usually works better for longer texts, and may misidentify shorter ones. To ensure the right language is selected, you can specify the language explicitly:
|
|
24
25
|
```bash
|
|
25
|
-
echogarden speak "Hello world!"
|
|
26
|
+
echogarden speak "Hello world!" --language=en
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
This would
|
|
29
|
+
This would save the resulting audio to `result.mp3`:
|
|
29
30
|
```bash
|
|
30
|
-
echogarden speak
|
|
31
|
+
echogarden speak "Hello world!" result.mp3 --language=en
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
`speak-file` synthesizes text loaded from a textual file, which can be either `.txt`, `.html`, `.srt`, `.vtt`:
|
|
35
|
+
```bash
|
|
36
|
+
echogarden speak-file text.txt result.mp3 --language=en
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
You can specify an engine using the `--engine` option (a full list of engines can be found [here](Engines.md)). This would set the synthesis engine to `pico` (SVOX Pico):
|
|
40
|
+
```bash
|
|
41
|
+
echogarden speak-file text.txt result.mp3 --language=en --engine=pico
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The CLI supports multiple output files. This would synthesize a text file, and save the resulting audio in both `result.mp3` and `result.wav`, as well as subtitles in `result.srt`:
|
|
34
45
|
```bash
|
|
35
46
|
echogarden speak-file text.txt result.mp3 result.wav result.srt --engine=vits --speed=1.1
|
|
36
47
|
```
|
|
37
48
|
|
|
38
49
|
Synthesize a web page (will try to extract its main article parts and omit the rest):
|
|
39
50
|
```bash
|
|
40
|
-
echogarden speak-url
|
|
51
|
+
echogarden speak-url https://example.com/hola
|
|
41
52
|
```
|
|
42
53
|
|
|
43
54
|
Synthesize a Wikipedia article in any of its language editions:
|
|
@@ -45,9 +56,20 @@ Synthesize a Wikipedia article in any of its language editions:
|
|
|
45
56
|
echogarden speak-wikipedia "Psychologie" --language=fr
|
|
46
57
|
```
|
|
47
58
|
|
|
59
|
+
By default, audio isn't played in the terminal when an output file is specified, you can override this behavior by adding `--play`
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
echogarden speak-file text.txt result.mp3 --engine=vits --play
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Or similarly prevent playback using `--no-play`:
|
|
66
|
+
```bash
|
|
67
|
+
echogarden speak "Hello world!" --language=en --no-play
|
|
68
|
+
```
|
|
69
|
+
|
|
48
70
|
## Speech to text
|
|
49
71
|
|
|
50
|
-
**Task**: given an audio recording containing speech, find a
|
|
72
|
+
**Task**: given an audio recording containing speech, find a textual transcription that best matches it.
|
|
51
73
|
|
|
52
74
|
This would transcribe the audio file `speech.mp3`, and then play the audio, along with the recognized text, in the terminal:
|
|
53
75
|
```bash
|
|
@@ -81,9 +103,9 @@ Echogarden can split the audio to multiple parts based on the segment boundaries
|
|
|
81
103
|
echogarden speak text.txt parts/[segment].opus
|
|
82
104
|
```
|
|
83
105
|
|
|
84
|
-
The `[segment]`
|
|
106
|
+
The `[segment]` placeholder would cause multiple files to be created, one for each text segment (segments would be determined according to paragraph or line breaks, in this case). The placeholder would be replaced by the index and initial text of the segment, producing an output file with a name like `parts/001 Hello world how are you doing ... .opus`.
|
|
85
107
|
|
|
86
|
-
Templates can also be used in multiple outputs. For instance, the following would align `speech.mp3` with `transcript.txt` and then split the audio
|
|
108
|
+
Templates can also be used in multiple outputs. For instance, the following would align `speech.mp3` with `transcript.txt` and then split the audio according to the segments found in the transcript, and store separate audio and timeline files for each part.
|
|
87
109
|
|
|
88
110
|
```bash
|
|
89
111
|
echogarden align speech.mp3 transcript.txt parts/[segment].m4a parts/[segment].json
|
|
@@ -215,19 +237,21 @@ echogarden denoise speech.mp3 denoised-speech.mp3
|
|
|
215
237
|
|
|
216
238
|
#### `list-tts-voices`
|
|
217
239
|
|
|
218
|
-
Shows a list of TTS voices for a given engine:
|
|
240
|
+
Shows a list of available TTS voices for a given engine:
|
|
219
241
|
|
|
220
242
|
```bash
|
|
221
243
|
echogarden list-tts-voices google-cloud
|
|
222
244
|
```
|
|
223
245
|
|
|
224
|
-
|
|
246
|
+
Saves the voice list in a JSON file:
|
|
225
247
|
```bash
|
|
226
248
|
echogarden list-tts-voices google-cloud google-cloud-voices.json
|
|
227
249
|
```
|
|
228
250
|
|
|
229
251
|
#### `install`, `uninstall` and `list-packages`
|
|
230
252
|
|
|
253
|
+
Manage the Echogarden packages that are locally installed:
|
|
254
|
+
|
|
231
255
|
* `install`: install one or more expansion packages
|
|
232
256
|
* `uninstall`: uninstall one or more expansion packages
|
|
233
257
|
* `list-packages`: list installed packages
|
package/docs/Development.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
1
|
# How to help
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
So far, this project has been the solo work of a single person (yours truly).
|
|
4
|
+
|
|
5
|
+
However, there are many areas where contributions can be made.
|
|
6
|
+
|
|
7
|
+
## Reporting any issue or bug you encounter
|
|
8
|
+
|
|
9
|
+
Especially if you're using the macOS platform, since I don't have access to a macOS machine.
|
|
10
|
+
|
|
11
|
+
## Reporting odd TTS pronunciations and other fail cases
|
|
12
|
+
|
|
13
|
+
Though that may be an issue with model training, which should be forwarded to the original authors
|
|
14
|
+
|
|
15
|
+
## Extending the pronunciation lexicons
|
|
16
|
+
|
|
17
|
+
Especially if you are proficient in a language other than English. In many cases, the default phonemizations produced by the eSpeak engine are incorrect
|
|
18
|
+
|
|
19
|
+
You can also add rules to help resolve the pronunciations of heteronyms (words that are written the same but can be pronounced in different ways depending on their context) based on their context.
|
package/docs/Engines.md
CHANGED
|
@@ -4,56 +4,64 @@
|
|
|
4
4
|
## Text to speech
|
|
5
5
|
|
|
6
6
|
**Offline**:
|
|
7
|
-
* [VITS](https://github.com/jaywalnut310/vits) (`vits`): a high-quality end-to-end neural speech synthesis architecture.
|
|
8
|
-
* [SVOX Pico](https://github.com/naggety/picotts) (`pico`): a diphone-based
|
|
9
|
-
* [Flite](https://github.com/festvox/flite) (`flite`): a diphone-based
|
|
10
|
-
* [eSpeak-NG](https://github.com/espeak-ng/espeak-ng/) (`espeak`): a formant-based synthesizer. Supports 100+ languages.
|
|
7
|
+
* [VITS](https://github.com/jaywalnut310/vits) (`vits`): a high-quality end-to-end neural speech synthesis architecture. Available models were trained by Michael Hansen as part of his [Piper speech synthesis system](https://github.com/rhasspy/piper). Currently there are 83 voices, in a range of languages, including English (US, UK), Spanish (ES, MX), Brazilian Portuguese, Italian, French, German, Dutch (NL, BE), Swedish, Norwegian, Danish, Finnish, Polish, Greek, Russian, Ukrainian, Catalan, Icelandic, Swahili, Kazakh, Georgian, Nepali, Vietnamese and Chinese. You can listen to audio samples of all voices and languages in [Piper's samples page](https://rhasspy.github.io/piper-samples/).
|
|
8
|
+
* [SVOX Pico](https://github.com/naggety/picotts) (`pico`): a legacy diphone-based synthesis engine. Supports English (US, UK), Spanish, Italian, French, and German.
|
|
9
|
+
* [Flite](https://github.com/festvox/flite) (`flite`): a legacy diphone-based synthesis engine. Supports English (US, Scottish), and several Indic languages: Hindi, Bengali, Marathi, Telugu, Tamil, Gujarati, Kannada and Punjabi.
|
|
10
|
+
* [eSpeak-NG](https://github.com/espeak-ng/espeak-ng/) (`espeak`): a lightweight "robot" sounding formant-based synthesizer. Supports 100+ languages. Extensively used internally for speech alignment, phonemization, and other internal tasks.
|
|
11
11
|
* [SAM (Software Automatic Mouth)](https://github.com/discordier/sam) (`sam`): a classic "robot" speech synthesizer from 1982. English only.
|
|
12
12
|
|
|
13
13
|
**Offline, Windows only**:
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
* [SAPI](https://en.wikipedia.org/wiki/Microsoft_Speech_API) (`sapi`): Microsoft Speech API. Supports the system's language voices, as well as legacy voices produced by third-party vendors, like Ivona, NeoSpeech, Acapela, Cepstral, CereProc, Nuance, AT&T, Loquendo, ScanSoft and others (note that only 64-bit SAPI voices are supported, which makes it incompatible with a significant portion of older voices).
|
|
16
16
|
|
|
17
|
-
`
|
|
17
|
+
* [Microsoft Speech Platform](https://www.microsoft.com/en-us/download/details.aspx?id=27225) (`msspeech`): Microsoft Server Speech API. Requires [installing a runtime (2.6MB)](https://www.microsoft.com/en-us/download/details.aspx?id=27225). Supports 28 dialects, which can be individually downloaded via [freely available installers](https://www.microsoft.com/en-us/download/details.aspx?id=27224), or, for convenience, bundled as [a single 358MB zip file](https://drive.google.com/u/0/uc?id=1uQdFNxLzUxpaEwVVKhMawys8cIh3F21T&export=download). Has voices for English (US, UK, AU, CA), Spanish (ES, MX), Portuguese (BR, PT), German, French (FR, CA), Italian, Norwegian, Dutch, Russian, Swedish, Danish, Catalan, Finnish, Japanese, Korean and Chinese (ZH, HK, TW). All voices are female.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
_Note_: both these engines require manually installing the [`winax` npm package](https://www.npmjs.com/package/winax) by running `npm install winax -g`.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`winax` is a native module which requires the Node.js Windows build tools to successfully install. If you have issues installing this package, please ensure that you've checked the "install necessary tools" checkbox during the installation of node.js.
|
|
22
22
|
|
|
23
|
-
**
|
|
23
|
+
**Client for remote or self-hosted servers**:
|
|
24
24
|
* [Coqui TTS](https://github.com/coqui-ai/TTS) server (`coqui-server`)
|
|
25
25
|
|
|
26
|
-
**Cloud
|
|
26
|
+
**Cloud services**:
|
|
27
|
+
|
|
28
|
+
These are commercial services that require a subscription and an API key to use:
|
|
29
|
+
|
|
27
30
|
* [Google Cloud](https://cloud.google.com/text-to-speech) (`google-cloud`)
|
|
28
31
|
* [Azure Cognitive Services](https://azure.microsoft.com/en-us/products/cognitive-services/text-to-speech/) (`microsoft-azure`)
|
|
29
32
|
* [Amazon Polly](https://aws.amazon.com/polly/) (`amazon-polly`)
|
|
30
33
|
* [Elevenlabs](https://beta.elevenlabs.io/) (`elevenlabs`)
|
|
31
34
|
|
|
32
|
-
**Cloud
|
|
35
|
+
**Cloud services (unofficial)**:
|
|
33
36
|
|
|
34
|
-
These cloud-based engines connect to public-facing cloud APIs that are not officially publicized by their operators. They are included for
|
|
37
|
+
These cloud-based engines connect to public-facing cloud APIs that are not officially publicized by their operators. They are included for educational purposes only, and may be removed in the future:
|
|
35
38
|
|
|
36
|
-
* Google Translate (`google-translate`): used by the [Google Translate web UI](https://translate.google.com/) to speak written text in any one of its supported languages. Offers a single voice (usually female)
|
|
39
|
+
* Google Translate (`google-translate`): used by the [Google Translate web UI](https://translate.google.com/) to speak written text in any one of its supported languages. Offers a single voice for each language (usually female).
|
|
37
40
|
* Microsoft Edge (`microsoft-edge`): subset of the Azure Cognitive Services cloud TTS API used by the Microsoft Edge browser as part of its support for the [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API) and its [Read Aloud](https://www.microsoft.com/en-us/edge/features/read-aloud?form=MT00D8) feature. Using this engine requires a special token, which should be passed via the `microsoftEdge.trustedClientToken` option.
|
|
38
41
|
* Streamlabs Polly (`streamlabs-polly`): a public REST API by Streamlabs, primarily intended for generating speech for TTS donations. It includes a few English (US, UK, AU, IN) voices, which are similar to some of the non-neural (Ivona-based) voices offered by Amazon Polly.
|
|
39
42
|
|
|
40
43
|
## Speech to text
|
|
41
44
|
|
|
42
45
|
**Offline**:
|
|
43
|
-
* [OpenAI Whisper](https://github.com/openai/whisper) (`whisper`): high accuracy transformer-based
|
|
44
|
-
* [Vosk](https://github.com/alphacep/vosk-api) (`vosk`): models available for 25+ languages. _Note_: Vosk is not included in the default installation, but you can add support for it using `npm install @echogarden/vosk -g`. You'll need to manually [download a model](https://alphacephei.com/vosk/models) and specify its directory path via the `vosk.modelPath` option.
|
|
46
|
+
* [OpenAI Whisper](https://github.com/openai/whisper) (`whisper`): high accuracy transformer-based architecture. Supports 99 languages. There are several models of different sizes, some are multilingual, and some are English only (`.en`): `tiny`, `tiny.en`, `base`, `base.en`, `small`, `small.en`, `medium`, `medium.en`, `large`, `large-v1` and `large-v2`. _Note_: large models are not currently auto-downloaded as Echogarden packages, but may become available in the future.
|
|
47
|
+
* [Vosk](https://github.com/alphacep/vosk-api) (`vosk`): models available for 25+ languages. _Note_: the Vosk package is not included in the default installation, but you can add support for it using `npm install @echogarden/vosk -g`. You'll need to manually [download a model](https://alphacephei.com/vosk/models) and specify its directory path via the `vosk.modelPath` option.
|
|
45
48
|
* [Silero](https://github.com/snakers4/silero-models) (`silero`): models available for English, Spanish, German and Ukrainian. For [non-commercial use only](https://github.com/snakers4/silero-models/blob/master/LICENSE).
|
|
46
49
|
|
|
47
|
-
**Cloud
|
|
50
|
+
**Cloud services**:
|
|
51
|
+
|
|
52
|
+
These are commercial services that require a subscription and an API key to use:
|
|
53
|
+
|
|
48
54
|
* [Google Cloud](https://cloud.google.com/speech-to-text) (`google-cloud`)
|
|
49
55
|
* [Azure Cognitive Services](https://azure.microsoft.com/en-us/products/cognitive-services/speech-to-text/) (`microsoft-azure`)
|
|
50
56
|
* [Amazon Transcribe](https://aws.amazon.com/transcribe/) (`amazon-transcribe`)
|
|
51
57
|
|
|
52
58
|
## Speech to transcript alignment
|
|
53
59
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
60
|
+
These engines' goal is to match (or "align") a given spoken recording with a given transcript as closely as possible. They will annotate each word in the transcript with approximate start and end timestamps:
|
|
61
|
+
|
|
62
|
+
* Dynamic Time Warping (`dtw`): transcript is first synthesized using the eSpeak engine, then [DTW](https://en.wikipedia.org/wiki/Dynamic_time_warping) is applied to find the best mapping between the synthesized audio and the original audio.
|
|
63
|
+
* Dynamic Time Warping with Recognition Assist (`dtw-ra`): recognition is applied to the audio (any recognition engine can be used), then both the ground-truth transcript and the recognized transcript are synthesized using eSpeak. Then, the best mapping is found between the two synthesized audio sequences, and the result is mapped back to the original audio using the timing information produced by the recognizer.
|
|
64
|
+
* Whisper-based alignment (`whisper`): transcript is tokenized and decoded along with the audio using the Whisper model, then timestamps are extracted from the internal state of the model (_note_: currently, only supports audio inputs that are 30 seconds or less).
|
|
57
65
|
|
|
58
66
|
## Speech translation
|
|
59
67
|
|
|
@@ -62,10 +70,10 @@ These cloud-based engines connect to public-facing cloud APIs that are not offic
|
|
|
62
70
|
## Language detection
|
|
63
71
|
|
|
64
72
|
**Spoken language detection**:
|
|
65
|
-
* [Whisper](https://github.com/openai/whisper) (`whisper`): uses the language token produced by the `whisper` speech recognition model to generate a set of probabilities for the 99 languages it has been trained on.
|
|
66
73
|
* [Silero Language Classifier](https://github.com/snakers4/silero-vad/wiki/Other-Models) (`silero`): a speech language classification model by Silero.
|
|
74
|
+
* [Whisper](https://github.com/openai/whisper) (`whisper`): uses the language token produced by the `whisper` speech recognition model to generate a set of probabilities for the 99 languages it has been trained on (_note_: currently only uses the first 30 seconds of the audio).
|
|
67
75
|
|
|
68
|
-
**
|
|
76
|
+
**Text language detection**:
|
|
69
77
|
* [TinyLD](https://www.npmjs.com/package/tinyld) (`tinyld`): a simple language detection library.
|
|
70
78
|
* [FastText](https://github.com/facebookresearch/fastText) (`fasttext`): a library for word representations and sentence classification by Facebook research.
|
|
71
79
|
|
package/docs/Licenses.md
CHANGED
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
|
|
24
24
|
## Package repository
|
|
25
25
|
|
|
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
|
* Flite voices (`flite-`): [BSD License](https://github.com/festvox/flite/blob/master/COPYING)
|
|
30
30
|
* SVOX Pico resources (`pico-`): [Apache License 2.0](https://github.com/gmn/nanotts/blob/master/LICENSE)
|
|
31
|
-
* Silero VAD (`silero-vad`) and Silero language classifier
|
|
31
|
+
* Silero VAD (`silero-vad`) and Silero language classifier (`silero-lang-classifier-95`): [MIT License](https://github.com/snakers4/silero-vad/blob/master/LICENSE)
|
|
32
32
|
* Silero speech recognition models (`silero-en-`, `silero-de-`, `silero-es-`, `silero-ua-`): [BY-NC-SA](https://github.com/snakers4/silero-models/blob/master/LICENSE)
|
|
33
33
|
* VITS pre-trained models (`vits-`): licensed under various creative commons licenses: [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/), [CC-BY](https://creativecommons.org/licenses/by/4.0/) and [BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/), and few are public domain (you can view the individual license for each model in the model cards on the [samples page](https://rhasspy.github.io/piper-samples/)). The [Piper system](https://github.com/rhasspy/piper) itself is published under the [MIT License](https://github.com/rhasspy/piper/blob/master/LICENSE.md)
|
|
34
34
|
* Whisper pre-trained models (`whisper-`): [MIT License](https://github.com/openai/whisper/blob/main/LICENSE)
|
package/docs/Options.md
CHANGED
|
@@ -9,7 +9,7 @@ Applicable to CLI commands: `speak`, `speak-file`, `speak-url`, `speak-wikipedia
|
|
|
9
9
|
General:
|
|
10
10
|
* `engine`: identifier of the synthesis engine to use, such as `espeak` or `vits`.
|
|
11
11
|
* `language`: language code, like `en`, `fr`, `en-US`, `pt-BR`. Auto-detected if not set
|
|
12
|
-
* `voice`: name of the voice to use. Optional
|
|
12
|
+
* `voice`: name of the voice to use. Can be a search string. Optional
|
|
13
13
|
* `voiceGender`: gender of the voice to use. Optional
|
|
14
14
|
* `speed`: speech rate factor, relative to default. In the range `0.1`..`10.0`. Defaults to `1.0`
|
|
15
15
|
* `pitch`: pitch factor, relative to default. In the range `0.1`..`10.0`. Defaults to `1.0`
|
|
@@ -75,7 +75,7 @@ Elevenlabs:
|
|
|
75
75
|
* `elevenLabs.similarityBoost`: similarity boost
|
|
76
76
|
|
|
77
77
|
Google Translate:
|
|
78
|
-
* `googleTranslate.tld`: top level domain to to connect to. Can change the dialect
|
|
78
|
+
* `googleTranslate.tld`: top level domain to to connect to. Can change the dialect for a small number or voices. For example `us` gives American English for `en`, while `com` gives British English for `en`. Defaults to `us`
|
|
79
79
|
|
|
80
80
|
Microsoft Edge:
|
|
81
81
|
* `microsoftEdge.trustedClientToken`: trusted client token (required). A special token required to use the service
|
package/docs/Tasklist.md
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# Developer's task list
|
|
2
|
+
|
|
3
|
+
## Bugs
|
|
4
|
+
|
|
5
|
+
### Audio player
|
|
6
|
+
* In rare situations, the audio player fails when encountering encoded markup (it can't find it in the text). Decide what to do when this happens
|
|
7
|
+
|
|
8
|
+
### Phoneme processing
|
|
9
|
+
* IPA -> Kirshenbaum translation is still not completely similar to what is output by eSpeak. Also, in rare situations, it outputs characters that are not accepted by eSpeak and eSpeak errors. Investigate when that happens and how to improve on this
|
|
10
|
+
|
|
11
|
+
### Segmentation
|
|
12
|
+
* eSpeak workaround for getting markers to work after sentence boundaries fails on some edge cases, especially when the input has special characters. Sequences like `**********` or `----------` fail.
|
|
13
|
+
|
|
14
|
+
### Browser extension
|
|
15
|
+
* Investigate why WebSpeech events sometimes completely stop working in the middle of an utterance for no apparent reason. Sometimes this is permanent, until the extension is restarted. Is this a browser issue?
|
|
16
|
+
* If a request is made and the server takes too much time to respond, the service worker may sleep and the request never canceled
|
|
17
|
+
|
|
18
|
+
### Browser extension / content script
|
|
19
|
+
* Highlighting sometimes does not appear when mouse is pressed over handle while speech of element starts
|
|
20
|
+
|
|
21
|
+
## Features and enhancements
|
|
22
|
+
|
|
23
|
+
### Browser extension
|
|
24
|
+
* Options UI
|
|
25
|
+
* Add supported engines and voices to WebSpeech voice list
|
|
26
|
+
* Pause and resume support
|
|
27
|
+
|
|
28
|
+
### Browser extension / content script
|
|
29
|
+
* Autoscroll should work even if the scrollbar relevant to the target element is not the viewport's scrollbar
|
|
30
|
+
* Find a way to show handles even for elements that start with a link
|
|
31
|
+
* Add detection for line breaks in `pre` blocks
|
|
32
|
+
* Some symbols, like `=`, `*`, `#` are not highlighted
|
|
33
|
+
* Support the custom tags used in YouTube comments
|
|
34
|
+
* Show handles based on `<br>` tags and possibly line breaks internal to the element
|
|
35
|
+
* Show handles based on sentence start positions
|
|
36
|
+
* UI or gesture to stop speech (other than the `esc` key)
|
|
37
|
+
* Hide handles when mouse leaves the viewport
|
|
38
|
+
* Don't show handles when mouse is over a large container element
|
|
39
|
+
* Button or keyboard shortcut to show and hide handles
|
|
40
|
+
* Show blinking placeholder when synthesis is loading for a particular text node
|
|
41
|
+
* Navigate paragraphs or sentences with keyboard shortcuts
|
|
42
|
+
|
|
43
|
+
### Worker
|
|
44
|
+
* Optionally omit unnecessary data from the response (decoded input, segment data, etc.)
|
|
45
|
+
* Support compressed audio in response
|
|
46
|
+
* Add cancelation checks in more operations
|
|
47
|
+
* Support more operations
|
|
48
|
+
|
|
49
|
+
### CLI
|
|
50
|
+
* Don't show an error when `--help` option is given, instead suggest to type `echogarden` or `echogarden help` to get help
|
|
51
|
+
* Find a way to ensure that a user who typed `align audio.mp3 transcript.txt` and then changed to `transcribe audio.mp3 transcript.txt` won't accidently overwrite their transcript file. Simple solution, but possibly not the best solution: `align audio.mp3 --reference=transcript.txt`. Other solution: on `transcribe` and `translate-speech`, ask if output file already exist or require an `--overwrite` flag to ensure that the user intended to overwrite the existing file.
|
|
52
|
+
* Restrict input media file extensions to a set list to avoid cases where a media file would be overwritten due to user error
|
|
53
|
+
* Show a message when a new version is available
|
|
54
|
+
* Figure out which terminal outputs should go to stdout, or if that's a good idea at all
|
|
55
|
+
* Option to set audio output codec options
|
|
56
|
+
* Option to set audio output device
|
|
57
|
+
* Print available synthesis voices when no voice matches (or suggest near matches)
|
|
58
|
+
* `transcribe` can also accept `http://` and `https://` URLs
|
|
59
|
+
* Use a file type detector like `file-type` that uses magic numbers to detect the type of a binary file regardless of its extension. This would help giving better error messages when the given file type is wrong.
|
|
60
|
+
* Consider adding the text offset to each segment, sentence and word in the resulting timeline with respect to the original file (even if it is, say, HTML or captions file)
|
|
61
|
+
* Add phone playback support
|
|
62
|
+
* More fine-grained intermediate progress report for operations
|
|
63
|
+
* Suggest possible correction on the error of not using `=`, e.g. `speed 0.9` instead of `speed=0.9`
|
|
64
|
+
* Multiple configuration files in `--config=..` taking precedence by order
|
|
65
|
+
* Support comments in JSON configuration file
|
|
66
|
+
* Generate JSON configuration file schema
|
|
67
|
+
* Make enum options case-insensitive if possible
|
|
68
|
+
* Mode to print IPA words when speaking
|
|
69
|
+
* Support list-typed properties configuration files (already supported in JSON)
|
|
70
|
+
|
|
71
|
+
### CLI / `speak-wikipedia`
|
|
72
|
+
* Correctly detect language when a Wikipedia URL is passed instead of an article name
|
|
73
|
+
* Add option to set language edition separately from language, since they use different language codes in some cases
|
|
74
|
+
|
|
75
|
+
### CLI / `speak-url`
|
|
76
|
+
* Use the Wikipedia reader when the URL is detected to be from `wikipedia.org`
|
|
77
|
+
|
|
78
|
+
### CLI / `list-packages`
|
|
79
|
+
* Support filters
|
|
80
|
+
|
|
81
|
+
### CLI / Configuration file
|
|
82
|
+
* Support arrays
|
|
83
|
+
|
|
84
|
+
### CLI / New commands
|
|
85
|
+
* `help`: Show help for a particular command, like `help transcribe`
|
|
86
|
+
* `list-engines`: List available engines for a particular command, like `list-engines speak`
|
|
87
|
+
* `play-with-captions`: Preview captions in terminal
|
|
88
|
+
* `play-with-timeline`: Preview timeline in terminal
|
|
89
|
+
* `captions-to-text`, `captions-to-timeline`, `srt-to-vtt`, `vtt-to-srt`
|
|
90
|
+
* `crop-to-timeline`, `split-by-timeline`
|
|
91
|
+
* `text-to-ipa`, `arpabet-to-ipa`, `ipa-to-arpabet`
|
|
92
|
+
* `phonemize-text`
|
|
93
|
+
* `normalize-text`
|
|
94
|
+
* `pos-tag-text`
|
|
95
|
+
* `remove-nonspeech`
|
|
96
|
+
* `speak-youtube`: To speak the transcript of a YouTube video
|
|
97
|
+
|
|
98
|
+
### API
|
|
99
|
+
* Option to control logging verbosity
|
|
100
|
+
* Add support to accept caption options in API and CLI
|
|
101
|
+
* Support full language names as inputs
|
|
102
|
+
* Retry on error when connecting to cloud providers, including WebSocket disconnection with `microsoft-edge` (already supported by `gaxios`, not sure about `ws` - decide on default setting)
|
|
103
|
+
* Validate timelines to ensure timestamps are always increasing, no -1 timestamps or timestamps over the time of the audio, no sentences without words, etc. and correct if needed
|
|
104
|
+
* Time/pitch shifting for recognition and alignment results
|
|
105
|
+
* Add support for phrases in timelines
|
|
106
|
+
* Accept voice list caching options in `SynthesisOptions`
|
|
107
|
+
|
|
108
|
+
### Language detection
|
|
109
|
+
* Deploy and add the new language detection model
|
|
110
|
+
* When using Whisper for language detection of speech, apply it to the entire audio, not just the first 30 seconds
|
|
111
|
+
|
|
112
|
+
### Segmentation
|
|
113
|
+
* Option to split segment on single line break as well as double line break (when splitting on double line breaks, there might be cases where a single line break should be seen as a sentence boundary - a line in song lyrics). Maybe a better approach is to optionally preprocess the text and merge subsequent lines than are intended to be a part of the same paragraph. In this way, paragraph breaks would always be single line breaks, and there's no need to carry settings for this detail within the program.
|
|
114
|
+
* Split long words
|
|
115
|
+
* See if it's possible to reliably use eSpeak as a segmentation engine
|
|
116
|
+
* Path to `kuromoji` dictionaries can be found more reliably than current
|
|
117
|
+
|
|
118
|
+
### Captions
|
|
119
|
+
* If a subtitle is too short and at the end of the audio, try to extend it back if possible (for example, if the previous subtitle is already extended, take back from it)
|
|
120
|
+
* Split long words if needed
|
|
121
|
+
* Decide how many punctuation characters to allow before breaking to a new line (currently it's infinite)
|
|
122
|
+
* Add more clause separators, for even more special cases
|
|
123
|
+
* Add option to output word or phoneme-level caption files (investigate how it's done on YouTube auto-captions)
|
|
124
|
+
* Parse VTT's language
|
|
125
|
+
* Option to generate captions that have word-level timings
|
|
126
|
+
|
|
127
|
+
### Synthesis
|
|
128
|
+
* Find places to add commas (",") to improve speech fluency. VITS voices don't normally add phrasing breaks if there is no punctuation
|
|
129
|
+
* An isolated dash " - " can be converted to a " , " to ensure there's a break in the speech.
|
|
130
|
+
* Ensure abbreviations like "Ph.d" or names like are segmented and read correctly (why doesn't `cldr` treat it as a word? Maybe it's not getting the right parameters, or it's not included in the list?) and "C#"
|
|
131
|
+
* Use preprocessed eSpeak in places other than VITS
|
|
132
|
+
* Way to manually reset voice list cache
|
|
133
|
+
* When synthesized text isn't pre-split to sentences, apply sentence splits by using the existing method to convert the output of word timelines to sentence/segment timelines
|
|
134
|
+
* Log full language of selected voice (it may have a different dialect than expected)
|
|
135
|
+
* Add partial SSML support for all engines. In particular, allow changing language or voice using the `<voice>` and `<lang>` tags, `<say-as>` and `<phoneme>` where possible.
|
|
136
|
+
* Some `sapi` voices and `msspeech` languages output phones that are converted to Microsoft alphabet, not IPA symbols. Try to see if these can be translated to IPA
|
|
137
|
+
* Decide whether asterisk `*` should be spoken when using `speak-url` or `speak-wikipedia`
|
|
138
|
+
* Decide what to do with `«` and `»` punctuation characters (guillemets) when parsing and playing
|
|
139
|
+
* Use VAD on the synthesized audio file to get more accurate sentence or word segmentation
|
|
140
|
+
* Try to remove reliance on `()` after `.` character hack in `EspeakTTS.synthesizeFragments`.
|
|
141
|
+
* eSpeak IPA output puts stress marks on vowels, not syllables - which is the standard for IPA. Consider how to make a conversion to and from these two approaches (possibly detect it automatically).
|
|
142
|
+
* Investigate if `espeak` can be made to correctly support phonemizing and pronouncing the dot character like in `object.key`
|
|
143
|
+
* Speaker-specific voice option
|
|
144
|
+
* Decide if `msspeech` engine should be selected if available. This would require attempting to load a matching voice, and falling back if it is not installed
|
|
145
|
+
* Option to disable alignment
|
|
146
|
+
|
|
147
|
+
### Synthesis / preprocessing
|
|
148
|
+
* Extend the heteronyms JSON document with more words
|
|
149
|
+
* Full date normalization (e.g. `21 August 2023`)
|
|
150
|
+
* Support custom lexicons. For example, a lexicon for general pronunciation corrections (for example `ee-lon` instead of `eh-lon`)
|
|
151
|
+
* Add support for capitalized only rules, and possibly also all uppercase / all lowercase rules.
|
|
152
|
+
* Support normalizing to graphemes, not only phonemes
|
|
153
|
+
* Is it possible to pre-phonemize common words like "the" or is it a bad idea / not necessary?
|
|
154
|
+
* Add support for user-defined lexicons for VITS synthesis (or any other one that supports preprocessing)
|
|
155
|
+
* Add support for text normalization preprocessing for all engines that can benefit from it (possibly including cloud engines).
|
|
156
|
+
* Add SAPI pronunciation to lexicons (the information is already there for `en_US` and `en_GB`)
|
|
157
|
+
* Try to use entity recognition to detect years, dates, currencies etc., which would disambiguate cases where it is not clear, like "in 1993" in "She was born in 1993" and "It searched in 1993 websites"
|
|
158
|
+
* Option to add POS tags to timeline, if available
|
|
159
|
+
* Cache lexicons to avoid parsing the JSON each time it is loaded (this may not be needed for now since the existing one is relatively small)
|
|
160
|
+
|
|
161
|
+
### VITS
|
|
162
|
+
* Allow to limit how many models are cached in memory
|
|
163
|
+
* Custom model paths (decide how to implement)
|
|
164
|
+
* Pull voice list from JSON file based on URL? Is that a good idea?
|
|
165
|
+
|
|
166
|
+
### Recognition
|
|
167
|
+
* Add confidence to each recognized word, if available
|
|
168
|
+
* Show alternatives when playing in the CLI. Clear current line and rewrite already printed text for alternatives during the speech recognition process
|
|
169
|
+
* Look for good split points using VAD before performing recognition
|
|
170
|
+
* Option to split recognized audio to segments or sentences, as is done with synthesized audio
|
|
171
|
+
|
|
172
|
+
### Whisper
|
|
173
|
+
* When using `dtw-ra` alignment, pass the transcript as a prompt. Remove some of the initial transcript based on what has been detected (try to find the best matching initial segment between the transcript and recognized text, and remove it at each recognition window).
|
|
174
|
+
* During language detection, if file is more than 30s, run the detection over all the segments and average the resulting probability distributions, consider how to handle very short segments
|
|
175
|
+
* Timestamps extracted from cross-attention are still not as accurate as what the official Python implementation gets. Try to see if you can make them better.
|
|
176
|
+
* Cache last model
|
|
177
|
+
* Integrate speech language detection into the recognition itself, so it is done efficiently when the language is not known
|
|
178
|
+
* Bring back option to use eSpeak DTW based alignment on segments, as an alternative approach
|
|
179
|
+
* The segment output can be use to split to segment files, otherwise it is possible to try to guess using the pause lengths or voice activity detection
|
|
180
|
+
* Way to specify model size, such that the English-only/multilingual would be auto selection for sizes other than `tiny`?
|
|
181
|
+
|
|
182
|
+
### Postprocessing
|
|
183
|
+
* When `normalize` is set to false, should obvious clipping still be prevented?
|
|
184
|
+
|
|
185
|
+
## Maintenance and cleanup
|
|
186
|
+
|
|
187
|
+
* Find a way to reset voice list cache on update
|
|
188
|
+
* CLI code has a lot of repetition. See how it can be refactored
|
|
189
|
+
* See if the installation of `winax` can be automated and only initiate if it is in a Windows environment
|
|
190
|
+
* Ensure that all modules have no internal state other than caching
|
|
191
|
+
* Start thinking about some modules being available in the browser. Which node core APIs the use? Which of them can be polyfilled, an which cannot?
|
|
192
|
+
* Change all the Emscripten WASM modules to use the `EXPORT_ES6=1` flag to all of them and rebuild them. Support for node.js was only added in September 2022 (https://github.com/emscripten-core/emscripten/pull/17915), so maybe wait a little bit until it is stable.
|
|
193
|
+
* Remove built-in voices from `flite` to reduce size?
|
|
194
|
+
|
|
195
|
+
## External bugs
|
|
196
|
+
|
|
197
|
+
* `espeak-ng`: 'Oh dear!”' is read as "oh dear exclamation mark", because of the special quote following the exclamation mark
|
|
198
|
+
* `espeak-ng`: [Marker right after sentence end is not reported as an event](https://github.com/espeak-ng/espeak-ng/issues/920)
|
|
199
|
+
* `espeak-ng`: On Japanese text, it says "Chinese character" or "Japanese character" for characters it doesn't know
|
|
200
|
+
* `wtf_wikipedia` Sometimes fails on `getResult.js` without throwing a humanly readable error
|
|
201
|
+
* `wtf_wikipedia` Sometimes captures markup like `.svg` etc.
|
|
202
|
+
* `msspeech`: Initialization fails on Chinese and Japanese voices (but not Korean)
|
|
203
|
+
* `compromise`: Slow initialization time. Currently it takes more than a second
|
|
204
|
+
* Chromium doesn't fire timer events when cursor is positioned over scrollbar or body margins
|
|
205
|
+
|
|
206
|
+
## Things to test
|
|
207
|
+
|
|
208
|
+
* Test that SSML works where it should
|
|
209
|
+
* Test synthesis, recognition and alignment with empty input. Do they still work?
|
|
210
|
+
|
|
211
|
+
## Future features and enhancements
|
|
212
|
+
|
|
213
|
+
### CLI
|
|
214
|
+
* Synthesize given subtitle file and try to preserve the existing timing of cues, or even align to existing speech
|
|
215
|
+
* Auto-generate options file, with comments, based on default options of the API
|
|
216
|
+
* Have the CLI launch a background worker (in a thread) to enable better parallelism
|
|
217
|
+
* Play back result audio while synthesis or recognition is still processing on the background (may require `worker_threads`)
|
|
218
|
+
* Navigate up down backward forward on file with timeline
|
|
219
|
+
* Auto-import project Gutenberg texts (by URL or from a file)
|
|
220
|
+
* `stdin` input support
|
|
221
|
+
* `stdout` output support
|
|
222
|
+
* Markdown file as text input?
|
|
223
|
+
|
|
224
|
+
### API
|
|
225
|
+
* Auto-install npm modules when needed using something like `npm-programmatic`
|
|
226
|
+
|
|
227
|
+
### Text enhancement
|
|
228
|
+
* Add capitalization and punctuation when to recognition outputs (Silero has a model for it for `en`, `de`, `ru`, `es`, but in `.pt` format only)
|
|
229
|
+
|
|
230
|
+
### Synthesis / preprocessing
|
|
231
|
+
* Extend preprocessing to other language versions of `compromise`. There are versions for French, German, Italian and Spanish
|
|
232
|
+
|
|
233
|
+
### Recognition
|
|
234
|
+
* Low latency recognition mode. Make the partial transcription available as fast as possible
|
|
235
|
+
* Live input / microphone recognition
|
|
236
|
+
* Live vosk alternatives events
|
|
237
|
+
* Implement beam search for Whisper decoder
|
|
238
|
+
* Implement beam search for Silero decoder
|
|
239
|
+
|
|
240
|
+
### Web
|
|
241
|
+
* Web based frontend UI to the server
|
|
242
|
+
* Adapt some WASM modules to also run on the web
|
|
243
|
+
* Investigate running in WebContainer
|
|
244
|
+
|
|
245
|
+
### Alignment
|
|
246
|
+
* Align audio file to audio file
|
|
247
|
+
* Alignment with speech translation assistance, which would enable multilingual subtitle replacement for translated captions
|
|
248
|
+
* Make `dtw` mode work with more speech synthesizers to produce its reference
|
|
249
|
+
|
|
250
|
+
## Documentation
|
|
251
|
+
|
|
252
|
+
### CLI
|
|
253
|
+
* Document the `serve` command
|
|
254
|
+
|
|
255
|
+
## Possible new engines or platforms
|
|
256
|
+
|
|
257
|
+
* OpenAI Whisper cloud service (`large-v2` model is available, at a price).
|
|
258
|
+
* [Assembly AI cloud service](https://www.assemblyai.com/)
|
|
259
|
+
* [Deepgram cloud service](https://deepgram.com/)
|
|
260
|
+
* `whisper.cpp` CLI and WASM support
|
|
261
|
+
* Coqui STT server connection
|
|
262
|
+
* See what can be done on supporting WinRT speech: in particular `windows.media.speechsynthesis` and `windows.media.speechrecognition` support, possibly using NodeRT or some other method.
|
|
263
|
+
* Figure out how to support `julius` speech recognition via WASM.
|
|
264
|
+
* Any way to support RHVoice?
|
|
265
|
+
* Silero text enhancement engine can be ported to ONNX
|
|
266
|
+
* Investigate Raspberry Pi support. In particular, see if `onnxruntime-node` can be built for this environment
|
|
267
|
+
* Reimplement KNN model in ONNX for better performance
|
|
268
|
+
|
|
269
|
+
## Maybe?
|
|
270
|
+
|
|
271
|
+
* PDF support
|
|
272
|
+
* Using a machine translation model to provide speech translation to languages other than English?
|
|
273
|
+
* Is it possible to get sentence boundaries without punctuation using NLP techniques like part of speech tagging?
|
|
274
|
+
|
|
275
|
+
## May or may not be good ideas
|
|
276
|
+
|
|
277
|
+
* Bring back interleaved playback
|
|
278
|
+
* Bring back debugging file output
|
|
279
|
+
|
|
280
|
+
## Other ideas
|
|
281
|
+
|
|
282
|
+
* HTML generator, that includes text and audio, with playback and word highlighting
|
|
283
|
+
* Video generator
|
|
284
|
+
* Desktop app that uses the tool to transcribe the PC audio output
|
|
285
|
+
* Special method to use time stretching to project between different utterances of the same text
|
|
286
|
+
* Is it possible to combine the Silero speech recognizer and a language model and try to perform Viterbi decoding to find alignments?
|
|
287
|
+
* Voice replacement
|
|
288
|
+
* Predict timing for individual letters (graphemes) based on phoneme timestamps
|