echogarden 2.1.1 → 2.2.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 (57) hide show
  1. package/README.md +18 -15
  2. package/data/lexicons/heteronyms.en.json +327 -122
  3. package/data/lexicons/words.en.json +260 -0
  4. package/data/schemas/options.json +20 -4
  5. package/dist/api/Recognition.d.ts +3 -1
  6. package/dist/api/Recognition.js +17 -0
  7. package/dist/api/Recognition.js.map +1 -1
  8. package/dist/api/Synthesis.d.ts +2 -2
  9. package/dist/api/Synthesis.js +3 -3
  10. package/dist/api/Synthesis.js.map +1 -1
  11. package/dist/codecs/FFMpegTranscoder.js +2 -0
  12. package/dist/codecs/FFMpegTranscoder.js.map +1 -1
  13. package/dist/nlp/EspeakPhonemizer.d.ts +2 -2
  14. package/dist/nlp/EspeakPhonemizer.js +36 -36
  15. package/dist/nlp/Lexicon.d.ts +2 -0
  16. package/dist/nlp/Lexicon.js +19 -19
  17. package/dist/nlp/Lexicon.js.map +1 -1
  18. package/dist/nlp/PhoneConversion.d.ts +1 -0
  19. package/dist/nlp/PhoneConversion.js +151 -222
  20. package/dist/nlp/PhoneConversion.js.map +1 -1
  21. package/dist/recognition/DeepgramSTT.d.ts +11 -0
  22. package/dist/recognition/DeepgramSTT.js +64 -0
  23. package/dist/recognition/DeepgramSTT.js.map +1 -0
  24. package/dist/recognition/GoogleCloudSTT.js.map +1 -1
  25. package/dist/synthesis/{ElevenlabsTTS.d.ts → ElevenLabsTTS.d.ts} +3 -3
  26. package/dist/synthesis/{ElevenlabsTTS.js → ElevenLabsTTS.js} +3 -3
  27. package/dist/synthesis/{ElevenlabsTTS.js.map → ElevenLabsTTS.js.map} +1 -1
  28. package/dist/synthesis/EspeakTTS.d.ts +1 -1
  29. package/dist/synthesis/EspeakTTS.js +9 -8
  30. package/dist/synthesis/EspeakTTS.js.map +1 -1
  31. package/dist/synthesis/KokoroTTS.js +14 -14
  32. package/dist/synthesis/VitsTTS.js +9 -9
  33. package/dist/utilities/Utilities.d.ts +1 -0
  34. package/dist/utilities/Utilities.js +5 -0
  35. package/dist/utilities/Utilities.js.map +1 -1
  36. package/dist/utilities/WasmMemoryManager.d.ts +1 -1
  37. package/docs/CLI.md +1 -1
  38. package/docs/CUDA.md +17 -0
  39. package/docs/Development.md +10 -2
  40. package/docs/Engines.md +2 -1
  41. package/docs/Options.md +19 -14
  42. package/docs/Tasklist.md +0 -1
  43. package/docs/Technical.md +18 -11
  44. package/package.json +6 -6
  45. package/src/api/Recognition.ts +29 -1
  46. package/src/api/Synthesis.ts +7 -7
  47. package/src/codecs/FFMpegTranscoder.ts +2 -0
  48. package/src/nlp/EspeakPhonemizer.ts +36 -36
  49. package/src/nlp/Lexicon.ts +24 -21
  50. package/src/nlp/PhoneConversion.ts +176 -225
  51. package/src/recognition/DeepgramSTT.ts +136 -0
  52. package/src/recognition/GoogleCloudSTT.ts +0 -1
  53. package/src/synthesis/{ElevenlabsTTS.ts → ElevenLabsTTS.ts} +4 -4
  54. package/src/synthesis/EspeakTTS.ts +9 -8
  55. package/src/synthesis/KokoroTTS.ts +15 -15
  56. package/src/synthesis/VitsTTS.ts +9 -9
  57. package/src/utilities/Utilities.ts +6 -0
package/README.md CHANGED
@@ -4,14 +4,15 @@ Echogarden is an easy-to-use speech toolset that includes a variety of speech pr
4
4
 
5
5
  * Easy to install, run, and update
6
6
  * Written in TypeScript, for the Node.js runtime
7
- * Can be used either as a command-line utility, or imported as an `npm` package
7
+ * Can be used either as a command-line utility, or imported as a standard `npm` package
8
8
  * Runs on Windows (x64, ARM64), macOS (x64, ARM64) and Linux (x64, ARM64)
9
9
  * Doesn't require Python, Docker, or other system-level dependencies
10
- * Doesn't rely on essential platform-specific binaries. Engines are either ported via WebAssembly, imported using the [ONNX runtime](https://onnxruntime.ai/), or written in pure TypeScript
10
+ * Doesn't rely on essential platform-specific binaries. Engines are either written in pure TypeScript, ported via WebAssembly, or imported using the [ONNX runtime](https://onnxruntime.ai/)
11
+ * Fully open-source (GPL v3)
11
12
 
12
13
  ## Features
13
14
 
14
- * **Text-to-speech** using high-quality [Kokoro](https://github.com/hexgrad/kokoro) and [VITS](https://github.com/jaywalnut310/vits) offline voices, for many languages and dialects, and [16 other offline and online engines](docs/Engines.md), including cloud services by [Google](https://cloud.google.com/text-to-speech), [Microsoft](https://azure.microsoft.com/en-us/products/ai-services/text-to-speech/), [Amazon](https://aws.amazon.com/polly/), [OpenAI](https://platform.openai.com/) and [Elevenlabs](https://elevenlabs.io/)
15
+ * **Text-to-speech** using high-quality [Kokoro](https://github.com/hexgrad/kokoro) and [VITS](https://github.com/jaywalnut310/vits) offline models for many languages and dialects, and [16 other offline and online engines](docs/Engines.md), including cloud services by [Google](https://cloud.google.com/text-to-speech), [Microsoft](https://azure.microsoft.com/en-us/products/ai-services/text-to-speech/), [Amazon](https://aws.amazon.com/polly/), [OpenAI](https://platform.openai.com/) and [Elevenlabs](https://elevenlabs.io/)
15
16
  * **Speech-to-text** using a custom TypeScript/ONNX port of the [OpenAI Whisper](https://openai.com/research/whisper) speech recognition architecture, [whisper.cpp](https://github.com/ggerganov/whisper.cpp), and [several other engines](docs/Engines.md), including cloud services by [Google](https://cloud.google.com/speech-to-text), [Microsoft](https://azure.microsoft.com/en-us/products/ai-services/speech-to-text/), [Amazon](https://aws.amazon.com/transcribe/) and [OpenAI](https://platform.openai.com/)
16
17
  * **Speech-to-transcript alignment** using several variants of [dynamic time warping](https://en.wikipedia.org/wiki/Dynamic_time_warping) (DTW, DTW-RA), including support for multi-pass (hierarchical) processing, or via guided decoding using Whisper recognition models. Supports 100+ languages
17
18
  * **Speech-to-text translation**, translates speech in any of the [98 languages](https://platform.openai.com/docs/guides/speech-to-text/supported-languages) supported by Whisper, to English, with near word-level timing for the translated transcript
@@ -21,33 +22,36 @@ Echogarden is an easy-to-use speech toolset that includes a variety of speech pr
21
22
  * **Language detection** identifies the language of a given audio or text. Includes Whisper or [Silero](https://github.com/snakers4/silero-vad/wiki/Other-Models) engines for spoken audio, and [TinyLD](https://www.npmjs.com/package/tinyld) or [FastText](https://github.com/facebookresearch/fastText) for text
22
23
  * **Voice activity detection** attempts to identify segments of audio where voice is active or inactive. Includes [WebRTC VAD](https://github.com/dpirch/libfvad), [Silero VAD](https://github.com/snakers4/silero-vad), [RNNoise-based VAD](https://github.com/xiph/rnnoise) and a built-in Adaptive Gate algorithm
23
24
  * **Speech denoising** attenuates background noise from spoken audio. Includes the [RNNoise](https://github.com/xiph/rnnoise) and [NSNet2](https://github.com/NeonGeckoCom/nsnet2-denoiser) engines
24
- * **Source separation** isolates voice from any music or background ambience. Supports the [MDX-NET](https://github.com/kuielab/mdx-net) deep learning architecture
25
+ * **Source separation** isolates voice from any music or background ambience. Includes the [MDX-NET](https://github.com/kuielab/mdx-net) deep learning architecture
25
26
  * **Word-level timestamps** for all recognition, synthesis, alignment and translation outputs
26
27
  * Advanced **subtitle generation**, accounting for sentence and phrase boundaries
27
- * For the VITS and eSpeak-NG synthesis engines, includes **enhancements to improve TTS pronunciation accuracy**: adds text normalization (e.g. idiomatic date and currency pronunciation), heteronym disambiguation (based on a rule-based model) and user-customizable pronunciation lexicons
28
+ * For the Kokoro, VITS and eSpeak-NG synthesis engines, includes **enhancements to improve TTS pronunciation accuracy**: adds text normalization (e.g. idiomatic date and currency pronunciation), English heteronym disambiguation (based on a simple rule-based model), various pronunciation corrections, and accepts user-provided pronunciation lexicons
28
29
  * **Internal package system** that auto-downloads and installs voices, models and other resources, as needed
29
30
 
30
31
  ## Installation
31
32
 
32
- Ensure you have [Node.js](https://nodejs.org/) `v18.16.0` or later installed.
33
+ Ensure you have [Node.js](https://nodejs.org/) `v18` or later installed (`v22` or later is recommended).
33
34
 
34
35
  then:
35
36
  ```bash
36
- npm install echogarden -g
37
+ npm install -g echogarden@latest
37
38
  ```
38
39
 
39
- ### Updating to latest version
40
+ ## Update
40
41
 
42
+ You can use [`npm-check-updates`](https://www.npmjs.com/package/npm-check-updates) to check for a newer version:
41
43
  ```bash
42
- npm update echogarden -g
44
+ npm install -g npm-check-updates
45
+ ncu -g echogarden
43
46
  ```
47
+ Then, if an updated version is available, use the command line `ncu` provides to make the update.
44
48
 
45
49
  ## Using the command-line interface
46
50
 
47
51
  A small sample of command lines:
48
52
  ```bash
49
53
  echogarden speak "Hello World!"
50
- echogarden speak-file story.txt
54
+ echogarden speak-file story.txt --engine=kokoro
51
55
  echogarden transcribe speech.mp3
52
56
  echogarden translate-speech speech.webm subtitles.srt
53
57
  echogarden align speech.opus transcript.txt
@@ -56,18 +60,17 @@ echogarden isolate speech.wav
56
60
 
57
61
  See the [command-line interface guide](docs/CLI.md) for more details on the operations supported, and the [configuration options reference](docs/Options.md) for a comprehensive list of all options supported.
58
62
 
59
- **Note**: on `v2.0.0`, a [newly developed audio playback library](https://github.com/echogarden-project/audio-io) was integrated into the command line interface. If you're having trouble hearing sound, or the sound is distorted, please [report this as an issue](https://github.com/echogarden-project/audio-io/issues). You can also switch back to the older [SoX](https://sourceforge.net/projects/sox/)-based player by adding `--player=sox` to the command-line. On macOS, you'll need to ensure SoX is available on the system path by installing it with a system package manager like [Homebrew](https://brew.sh/) (`brew install sox`).
60
-
61
63
  ## Using the Node.js API
62
64
 
63
- If you are a developer, you can also [directly import the package as a dependency](docs/API.md). The API operations and options closely mirror the CLI.
65
+ If you are a developer, you can also [directly import the package as a dependency](docs/API.md) in your code. The API operations and options closely mirror the CLI.
64
66
 
65
- ## Documentation
67
+ ## Documentation and guides
66
68
 
67
69
  * [Quick guide to the command-line interface](docs/CLI.md)
68
70
  * [Options reference](docs/Options.md)
69
- * [Full list of supported engines](docs/Engines.md)
71
+ * [Full list of all available engines](docs/Engines.md)
70
72
  * [Node.js API reference](docs/API.md)
73
+ * [Enabling the CUDA ONNX execution provider](docs/CUDA.md)
71
74
  * [Technical overview and Q&A](docs/Technical.md)
72
75
  * [How to help](docs/Contributing.md)
73
76
  * [Setting up a development environment](docs/Development.md)