echogarden 0.0.1 → 0.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 +59 -1
- package/data/lexicons/heteronyms.json +674 -0
- package/data/schemas/options.json +1057 -0
- package/data/tables/lcid-table.json +7427 -0
- package/dist/alignment/DTWMfccSequenceAlignment.d.ts +2 -0
- package/dist/alignment/DTWMfccSequenceAlignment.js +26 -0
- package/dist/alignment/DTWMfccSequenceAlignment.js.map +1 -0
- package/dist/alignment/DTWSequenceAlignment.d.ts +5 -0
- package/dist/alignment/DTWSequenceAlignment.js +99 -0
- package/dist/alignment/DTWSequenceAlignment.js.map +1 -0
- package/dist/alignment/DTWSequenceAlignmentWindowed.d.ts +5 -0
- package/dist/alignment/DTWSequenceAlignmentWindowed.js +161 -0
- package/dist/alignment/DTWSequenceAlignmentWindowed.js.map +1 -0
- package/dist/alignment/LevenshteinSequenceAlignment.d.ts +5 -0
- package/dist/alignment/LevenshteinSequenceAlignment.js +102 -0
- package/dist/alignment/LevenshteinSequenceAlignment.js.map +1 -0
- package/dist/alignment/SpeechAlignment.d.ts +27 -0
- package/dist/alignment/SpeechAlignment.js +266 -0
- package/dist/alignment/SpeechAlignment.js.map +1 -0
- package/dist/api/API.d.ts +8 -0
- package/dist/api/API.js +10 -0
- package/dist/api/API.js.map +1 -0
- package/dist/api/APIOptions.d.ts +12 -0
- package/dist/api/APIOptions.js +2 -0
- package/dist/api/APIOptions.js.map +1 -0
- package/dist/api/Alignment.d.ts +32 -0
- package/dist/api/Alignment.js +134 -0
- package/dist/api/Alignment.js.map +1 -0
- package/dist/api/Denoising.d.ts +14 -0
- package/dist/api/Denoising.js +66 -0
- package/dist/api/Denoising.js.map +1 -0
- package/dist/api/Globals.d.ts +1 -0
- package/dist/api/Globals.js +2 -0
- package/dist/api/Globals.js.map +1 -0
- package/dist/api/LanguageDetection.d.ts +49 -0
- package/dist/api/LanguageDetection.js +118 -0
- package/dist/api/LanguageDetection.js.map +1 -0
- package/dist/api/Recognition.d.ts +49 -0
- package/dist/api/Recognition.js +162 -0
- package/dist/api/Recognition.js.map +1 -0
- package/dist/api/Synthesis.d.ts +125 -0
- package/dist/api/Synthesis.js +892 -0
- package/dist/api/Synthesis.js.map +1 -0
- package/dist/api/Translation.d.ts +25 -0
- package/dist/api/Translation.js +69 -0
- package/dist/api/Translation.js.map +1 -0
- package/dist/api/Vad.d.ts +25 -0
- package/dist/api/Vad.js +88 -0
- package/dist/api/Vad.js.map +1 -0
- package/dist/audio/AudioBufferConversion.d.ts +15 -0
- package/dist/audio/AudioBufferConversion.js +228 -0
- package/dist/audio/AudioBufferConversion.js.map +1 -0
- package/dist/audio/AudioPlayer.d.ts +9 -0
- package/dist/audio/AudioPlayer.js +232 -0
- package/dist/audio/AudioPlayer.js.map +1 -0
- package/dist/audio/AudioRecorder.d.ts +3 -0
- package/dist/audio/AudioRecorder.js +68 -0
- package/dist/audio/AudioRecorder.js.map +1 -0
- package/dist/audio/AudioUtilities.d.ts +48 -0
- package/dist/audio/AudioUtilities.js +209 -0
- package/dist/audio/AudioUtilities.js.map +1 -0
- package/dist/audio/SoxPath.d.ts +1 -0
- package/dist/audio/SoxPath.js +19 -0
- package/dist/audio/SoxPath.js.map +1 -0
- package/dist/cli/CLI.d.ts +8 -0
- package/dist/cli/CLI.js +860 -0
- package/dist/cli/CLI.js.map +1 -0
- package/dist/cli/CLIConfigFile.d.ts +3 -0
- package/dist/cli/CLIConfigFile.js +62 -0
- package/dist/cli/CLIConfigFile.js.map +1 -0
- package/dist/cli/CLILauncher.d.ts +2 -0
- package/dist/cli/CLILauncher.js +22 -0
- package/dist/cli/CLILauncher.js.map +1 -0
- package/dist/cli/CLIOptionsSchema.d.ts +5 -0
- package/dist/cli/CLIOptionsSchema.js +36 -0
- package/dist/cli/CLIOptionsSchema.js.map +1 -0
- package/dist/cli/CLIParser.d.ts +6 -0
- package/dist/cli/CLIParser.js +34 -0
- package/dist/cli/CLIParser.js.map +1 -0
- package/dist/cli/CLIStarter.d.ts +1 -0
- package/dist/cli/CLIStarter.js +3 -0
- package/dist/cli/CLIStarter.js.map +1 -0
- package/dist/codecs/FFMpegTranscoder.d.ts +20 -0
- package/dist/codecs/FFMpegTranscoder.js +169 -0
- package/dist/codecs/FFMpegTranscoder.js.map +1 -0
- package/dist/codecs/TIMITCodec.d.ts +9 -0
- package/dist/codecs/TIMITCodec.js +14 -0
- package/dist/codecs/TIMITCodec.js.map +1 -0
- package/dist/codecs/WaveCodec.d.ts +19 -0
- package/dist/codecs/WaveCodec.js +208 -0
- package/dist/codecs/WaveCodec.js.map +1 -0
- package/dist/denoising/RNNoise.d.ts +6 -0
- package/dist/denoising/RNNoise.js +68 -0
- package/dist/denoising/RNNoise.js.map +1 -0
- package/dist/dsp/BiquadFilter.d.ts +26 -0
- package/dist/dsp/BiquadFilter.js +399 -0
- package/dist/dsp/BiquadFilter.js.map +1 -0
- package/dist/dsp/FFT.d.ts +9 -0
- package/dist/dsp/FFT.js +135 -0
- package/dist/dsp/FFT.js.map +1 -0
- package/dist/dsp/MFCC.d.ts +25 -0
- package/dist/dsp/MFCC.js +162 -0
- package/dist/dsp/MFCC.js.map +1 -0
- package/dist/dsp/MelSpectogram.d.ts +19 -0
- package/dist/dsp/MelSpectogram.js +102 -0
- package/dist/dsp/MelSpectogram.js.map +1 -0
- package/dist/dsp/Rubberband.d.ts +52 -0
- package/dist/dsp/Rubberband.js +186 -0
- package/dist/dsp/Rubberband.js.map +1 -0
- package/dist/dsp/Sonic.d.ts +2 -0
- package/dist/dsp/Sonic.js +39 -0
- package/dist/dsp/Sonic.js.map +1 -0
- package/dist/dsp/SpeexResampler.d.ts +3 -0
- package/dist/dsp/SpeexResampler.js +53 -0
- package/dist/dsp/SpeexResampler.js.map +1 -0
- package/dist/math/VectorMath.d.ts +70 -0
- package/dist/math/VectorMath.js +564 -0
- package/dist/math/VectorMath.js.map +1 -0
- package/dist/nlp/ChineseSegmentation.d.ts +1 -0
- package/dist/nlp/ChineseSegmentation.js +53 -0
- package/dist/nlp/ChineseSegmentation.js.map +1 -0
- package/dist/nlp/CompromiseNLP.d.ts +15 -0
- package/dist/nlp/CompromiseNLP.js +66 -0
- package/dist/nlp/CompromiseNLP.js.map +1 -0
- package/dist/nlp/EspeakPhonemizer.d.ts +4 -0
- package/dist/nlp/EspeakPhonemizer.js +133 -0
- package/dist/nlp/EspeakPhonemizer.js.map +1 -0
- package/dist/nlp/IPA.d.ts +19 -0
- package/dist/nlp/IPA.js +113 -0
- package/dist/nlp/IPA.js.map +1 -0
- package/dist/nlp/JapaneseSegmentation.d.ts +1 -0
- package/dist/nlp/JapaneseSegmentation.js +40 -0
- package/dist/nlp/JapaneseSegmentation.js.map +1 -0
- package/dist/nlp/Lexicon.d.ts +17 -0
- package/dist/nlp/Lexicon.js +6 -0
- package/dist/nlp/Lexicon.js.map +1 -0
- package/dist/nlp/PhoneConversion.d.ts +6 -0
- package/dist/nlp/PhoneConversion.js +467 -0
- package/dist/nlp/PhoneConversion.js.map +1 -0
- package/dist/nlp/Segmentation.d.ts +41 -0
- package/dist/nlp/Segmentation.js +158 -0
- package/dist/nlp/Segmentation.js.map +1 -0
- package/dist/nlp/TextNormalizer.d.ts +4 -0
- package/dist/nlp/TextNormalizer.js +69 -0
- package/dist/nlp/TextNormalizer.js.map +1 -0
- package/dist/recognition/AmazonTranscribeSTT.d.ts +6 -0
- package/dist/recognition/AmazonTranscribeSTT.js +79 -0
- package/dist/recognition/AmazonTranscribeSTT.js.map +1 -0
- package/dist/recognition/AzureCognitiveServicesSTT.d.ts +7 -0
- package/dist/recognition/AzureCognitiveServicesSTT.js +51 -0
- package/dist/recognition/AzureCognitiveServicesSTT.js.map +1 -0
- package/dist/recognition/GoogleCloudSTT.d.ts +7 -0
- package/dist/recognition/GoogleCloudSTT.js +66 -0
- package/dist/recognition/GoogleCloudSTT.js.map +1 -0
- package/dist/recognition/SileroSTT.d.ts +9 -0
- package/dist/recognition/SileroSTT.js +125 -0
- package/dist/recognition/SileroSTT.js.map +1 -0
- package/dist/recognition/VoskSTT.d.ts +10 -0
- package/dist/recognition/VoskSTT.js +78 -0
- package/dist/recognition/VoskSTT.js.map +1 -0
- package/dist/recognition/WhisperSTT.d.ts +69 -0
- package/dist/recognition/WhisperSTT.js +977 -0
- package/dist/recognition/WhisperSTT.js.map +1 -0
- package/dist/server/Server.d.ts +1 -0
- package/dist/server/Server.js +18 -0
- package/dist/server/Server.js.map +1 -0
- package/dist/speech-language-detection/SileroLanguageDetection.d.ts +9 -0
- package/dist/speech-language-detection/SileroLanguageDetection.js +47 -0
- package/dist/speech-language-detection/SileroLanguageDetection.js.map +1 -0
- package/dist/subtitles/Subtitles.d.ts +25 -0
- package/dist/subtitles/Subtitles.js +286 -0
- package/dist/subtitles/Subtitles.js.map +1 -0
- package/dist/synthesis/AwsPollyTTS.d.ts +7 -0
- package/dist/synthesis/AwsPollyTTS.js +51 -0
- package/dist/synthesis/AwsPollyTTS.js.map +1 -0
- package/dist/synthesis/AzureCognitiveServicesTTS.d.ts +9 -0
- package/dist/synthesis/AzureCognitiveServicesTTS.js +103 -0
- package/dist/synthesis/AzureCognitiveServicesTTS.js.map +1 -0
- package/dist/synthesis/CoquiServerTTS.d.ts +6 -0
- package/dist/synthesis/CoquiServerTTS.js +22 -0
- package/dist/synthesis/CoquiServerTTS.js.map +1 -0
- package/dist/synthesis/ElevenLabsTTS.d.ts +8 -0
- package/dist/synthesis/ElevenLabsTTS.js +48 -0
- package/dist/synthesis/ElevenLabsTTS.js.map +1 -0
- package/dist/synthesis/EspeakTTS.d.ts +46 -0
- package/dist/synthesis/EspeakTTS.js +353 -0
- package/dist/synthesis/EspeakTTS.js.map +1 -0
- package/dist/synthesis/FliteTTS.d.ts +17 -0
- package/dist/synthesis/FliteTTS.js +326 -0
- package/dist/synthesis/FliteTTS.js.map +1 -0
- package/dist/synthesis/GoogleCloudTTS.d.ts +16 -0
- package/dist/synthesis/GoogleCloudTTS.js +72 -0
- package/dist/synthesis/GoogleCloudTTS.js.map +1 -0
- package/dist/synthesis/GoogleTranslateTTS.d.ts +13 -0
- package/dist/synthesis/GoogleTranslateTTS.js +177 -0
- package/dist/synthesis/GoogleTranslateTTS.js.map +1 -0
- package/dist/synthesis/MicrosoftEdgeTTS.d.ts +10 -0
- package/dist/synthesis/MicrosoftEdgeTTS.js +216 -0
- package/dist/synthesis/MicrosoftEdgeTTS.js.map +1 -0
- package/dist/synthesis/SamTTS.d.ts +4 -0
- package/dist/synthesis/SamTTS.js +21 -0
- package/dist/synthesis/SamTTS.js.map +1 -0
- package/dist/synthesis/SapiTTS.d.ts +9 -0
- package/dist/synthesis/SapiTTS.js +211 -0
- package/dist/synthesis/SapiTTS.js.map +1 -0
- package/dist/synthesis/StreamlabsPollyTTS.d.ts +12 -0
- package/dist/synthesis/StreamlabsPollyTTS.js +88 -0
- package/dist/synthesis/StreamlabsPollyTTS.js.map +1 -0
- package/dist/synthesis/SvoxPicoTTS.d.ts +11 -0
- package/dist/synthesis/SvoxPicoTTS.js +236 -0
- package/dist/synthesis/SvoxPicoTTS.js.map +1 -0
- package/dist/synthesis/VitsTTS.d.ts +27 -0
- package/dist/synthesis/VitsTTS.js +359 -0
- package/dist/synthesis/VitsTTS.js.map +1 -0
- package/dist/tests/Test.d.ts +1 -0
- package/dist/tests/Test.js +10 -0
- package/dist/tests/Test.js.map +1 -0
- package/dist/text-language-detection/FastTextLanguageDetection.d.ts +2 -0
- package/dist/text-language-detection/FastTextLanguageDetection.js +38 -0
- package/dist/text-language-detection/FastTextLanguageDetection.js.map +1 -0
- package/dist/text-language-detection/TinyLDLanguageDetection.d.ts +2 -0
- package/dist/text-language-detection/TinyLDLanguageDetection.js +12 -0
- package/dist/text-language-detection/TinyLDLanguageDetection.js.map +1 -0
- package/dist/utilities/BinaryArrayConversion.d.ts +15 -0
- package/dist/utilities/BinaryArrayConversion.js +115 -0
- package/dist/utilities/BinaryArrayConversion.js.map +1 -0
- package/dist/utilities/Compression.d.ts +4 -0
- package/dist/utilities/Compression.js +67 -0
- package/dist/utilities/Compression.js.map +1 -0
- package/dist/utilities/FileDownloader.d.ts +3 -0
- package/dist/utilities/FileDownloader.js +147 -0
- package/dist/utilities/FileDownloader.js.map +1 -0
- package/dist/utilities/FileSystem.d.ts +30 -0
- package/dist/utilities/FileSystem.js +141 -0
- package/dist/utilities/FileSystem.js.map +1 -0
- package/dist/utilities/Hashing.d.ts +10 -0
- package/dist/utilities/Hashing.js +169 -0
- package/dist/utilities/Hashing.js.map +1 -0
- package/dist/utilities/Locale.d.ts +9 -0
- package/dist/utilities/Locale.js +65 -0
- package/dist/utilities/Locale.js.map +1 -0
- package/dist/utilities/Logger.d.ts +11 -0
- package/dist/utilities/Logger.js +49 -0
- package/dist/utilities/Logger.js.map +1 -0
- package/dist/utilities/NdArrayUtilities.d.ts +3 -0
- package/dist/utilities/NdArrayUtilities.js +22 -0
- package/dist/utilities/NdArrayUtilities.js.map +1 -0
- package/dist/utilities/ObjectUtilities.d.ts +4 -0
- package/dist/utilities/ObjectUtilities.js +132 -0
- package/dist/utilities/ObjectUtilities.js.map +1 -0
- package/dist/utilities/OpenPromise.d.ts +6 -0
- package/dist/utilities/OpenPromise.js +12 -0
- package/dist/utilities/OpenPromise.js.map +1 -0
- package/dist/utilities/PackageManager.d.ts +4 -0
- package/dist/utilities/PackageManager.js +46 -0
- package/dist/utilities/PackageManager.js.map +1 -0
- package/dist/utilities/RandomGenerator.d.ts +35 -0
- package/dist/utilities/RandomGenerator.js +149 -0
- package/dist/utilities/RandomGenerator.js.map +1 -0
- package/dist/utilities/TarballMaker.d.ts +4 -0
- package/dist/utilities/TarballMaker.js +50 -0
- package/dist/utilities/TarballMaker.js.map +1 -0
- package/dist/utilities/Timeline.d.ts +20 -0
- package/dist/utilities/Timeline.js +110 -0
- package/dist/utilities/Timeline.js.map +1 -0
- package/dist/utilities/Timer.d.ts +13 -0
- package/dist/utilities/Timer.js +70 -0
- package/dist/utilities/Timer.js.map +1 -0
- package/dist/utilities/Utilities.d.ts +68 -0
- package/dist/utilities/Utilities.js +305 -0
- package/dist/utilities/Utilities.js.map +1 -0
- package/dist/utilities/WasmMemoryManager.d.ts +142 -0
- package/dist/utilities/WasmMemoryManager.js +407 -0
- package/dist/utilities/WasmMemoryManager.js.map +1 -0
- package/dist/utilities/WebReader.d.ts +1 -0
- package/dist/utilities/WebReader.js +47 -0
- package/dist/utilities/WebReader.js.map +1 -0
- package/dist/utilities/WikipediaReader.d.ts +1 -0
- package/dist/utilities/WikipediaReader.js +31 -0
- package/dist/utilities/WikipediaReader.js.map +1 -0
- package/dist/voice-activity-detection/SileroVAD.d.ts +13 -0
- package/dist/voice-activity-detection/SileroVAD.js +58 -0
- package/dist/voice-activity-detection/SileroVAD.js.map +1 -0
- package/dist/voice-activity-detection/WebRtcVAD.d.ts +3 -0
- package/dist/voice-activity-detection/WebRtcVAD.js +53 -0
- package/dist/voice-activity-detection/WebRtcVAD.js.map +1 -0
- package/docs/CLI.md +234 -0
- package/docs/Development.md +3 -0
- package/docs/Engines.md +80 -0
- package/docs/Licenses.md +37 -0
- package/docs/Options.md +192 -0
- package/docs/Roadmap.md +16 -0
- package/docs/Technical.md +72 -0
- package/package.json +119 -19
- package/cli.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebRtcVAD.js","sourceRoot":"","sources":["../../src/voice-activity-detection/WebRtcVAD.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAA;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAA;AAErE,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,QAAkB,EAAE,gBAA8B,EAAE,EAAE,OAAsB,CAAC;IACtH,IAAI,QAAQ,CAAC,UAAU,IAAI,KAAK,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;KAClD;IAED,MAAM,oBAAoB,GAAc,MAAM,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,CAAC,CAAA;IAEhK,OAAO,oBAAoB,CAAA;AAC5B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,OAAmB,EAAE,UAAkB,EAAE,aAA2B,EAAE,IAAmB;IACnH,MAAM,CAAC,GAAG,MAAM,eAAe,EAAE,CAAA;IAEjC,MAAM,UAAU,GAAG,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAA;IAE3C,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,CAAA;IAC5B,MAAM,SAAS,GAAG,CAAC,CAAC,UAAU,CAAA;IAC9B,MAAM,UAAU,GAAG,CAAC,CAAC,WAAW,CAAA;IAChC,MAAM,aAAa,GAAG,CAAC,CAAC,cAAc,CAAA;IACtC,MAAM,oBAAoB,GAAG,CAAC,CAAC,qBAAqB,CAAA;IACpD,MAAM,YAAY,GAAG,CAAC,CAAC,aAAa,CAAA;IAEpC,MAAM,WAAW,GAAG,QAAQ,EAAE,CAAA;IAE9B,MAAM,eAAe,GAAG,oBAAoB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;IAErE,IAAI,eAAe,IAAI,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,yCAAyC,UAAU,EAAE,CAAC,CAAA;KACtE;IAED,MAAM,SAAS,GAAG,aAAa,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;IAElD,IAAI,SAAS,IAAI,CAAC,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,IAAI,EAAE,CAAC,CAAA;KACxD;IAED,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC,CAAA;IACxE,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAA;IAEpE,MAAM,MAAM,GAAG,EAAE,CAAA;IAEjB,KAAK,IAAI,YAAY,GAAG,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,YAAY,IAAI,gBAAgB,EAAE;QAC3F,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG,gBAAgB,CAAC,CAAA;QAE7E,eAAe,CAAC,KAAK,EAAE,CAAA;QACvB,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAE/B,MAAM,UAAU,GAAG,YAAY,CAAC,WAAW,EAAE,eAAe,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAA;QAEvF,IAAI,UAAU,IAAI,CAAC,CAAC,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;SACtC;QAED,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;KACvB;IAED,SAAS,CAAC,WAAW,CAAC,CAAA;IACtB,UAAU,CAAC,OAAO,EAAE,CAAA;IAEpB,OAAO,MAAM,CAAA;AACd,CAAC;AAED,IAAI,YAAiB,CAAA;AACrB,KAAK,UAAU,eAAe;IAC7B,IAAI,CAAC,YAAY,EAAE;QAClB,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAA;QAE1E,YAAY,GAAG,MAAM,eAAe,EAAE,CAAA;KACtC;IAED,OAAO,YAAY,CAAA;AACpB,CAAC"}
|
package/docs/CLI.md
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
|
|
2
|
+
# Using the command line interface
|
|
3
|
+
|
|
4
|
+
All CLI command lines have the general structure:
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
echogarden [command] [one or more inputs..] [one or more outputs...] [options...]
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Here's a quick tour of the main operations available via the CLI.
|
|
11
|
+
|
|
12
|
+
Each command accepts many options, in the form `--[optionName]=[value]` (The `=` is required). A detailed reference of all the options can be found [here](Options.md).
|
|
13
|
+
|
|
14
|
+
## Text to speech
|
|
15
|
+
|
|
16
|
+
**Task**: given a text file, synthesize spoken audio for it.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
This would synthesize "Hello World" and play the result in the terminal:
|
|
20
|
+
```bash
|
|
21
|
+
echogarden speak "Hello world!"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
You can add a file output instead, which would cause the audio to be stored in `result.mp3`:
|
|
25
|
+
```bash
|
|
26
|
+
echogarden speak "Hello world!" result.mp3
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This would synthesize a text file `text.txt`, and have the resulting audio stored in `result.mp3`. The `--engine=pico` would set the synthesis engine to `pico` (SVOX Pico):
|
|
30
|
+
```bash
|
|
31
|
+
echogarden speak-file text.txt result.mp3 --engine=pico
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This would synthesize a text file, and have the result stored in both `result.mp3` and `result.wav`, as well as a subtitle file in `result.srt`:
|
|
35
|
+
```bash
|
|
36
|
+
echogarden speak-file text.txt result.mp3 result.wav result.srt --engine=vits --speed=1.1
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Synthesize a web page (will try to extract its main article parts and omit the rest):
|
|
40
|
+
```bash
|
|
41
|
+
echogarden speak-url http://example.com/hola
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Synthesize a Wikipedia article in any of its language editions:
|
|
45
|
+
```bash
|
|
46
|
+
echogarden speak-wikipedia "Psychologie" --language=fr
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Speech to text
|
|
50
|
+
|
|
51
|
+
**Task**: given an audio recording containing speech, find a text transcription that best matches it.
|
|
52
|
+
|
|
53
|
+
This would transcribe the audio file `speech.mp3`, and then play the audio, along with the recognized text, in the terminal:
|
|
54
|
+
```bash
|
|
55
|
+
echogarden transcribe speech.mp3
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This would transcribe the audio file `speech.mp3` and store the resulting transcription in `result.txt`, subtitles in `result.srt`, and a full timeline tree in `result.json`:
|
|
59
|
+
```bash
|
|
60
|
+
echogarden transcribe speech.mp3 result.txt result.srt result.json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Speech to transcript alignment
|
|
64
|
+
|
|
65
|
+
**Task**: given an audio file and its transcript, try to approximate the timing of the start and end of each spoken word (and its subparts).
|
|
66
|
+
|
|
67
|
+
This would align the audio file `speech.mp3` with the transcript provided in `transcript.txt`, and would play the synchronized result in the terminal:
|
|
68
|
+
```bash
|
|
69
|
+
echogarden align speech.mp3 transcript.txt
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This would align the audio file `speech.mp3` with the transcript provided in `transcript.txt`, and store the resulting timeline tree in `result.json` and subtitles in `result.srt`:
|
|
73
|
+
```bash
|
|
74
|
+
echogarden speak-file text.txt transcript.txt result.json result.srt
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Using output file templates to split the outputs to multiple parts
|
|
78
|
+
|
|
79
|
+
Echogarden can split the audio to multiple parts based on the segment boundaries detected. For example:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
echogarden speak text.txt parts/[segment].opus
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The `[segment]` pattern 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 pattern would be replaced by the index and initial text of the segment. For example by `parts/01 Hello world how are you doing ... .opus`.
|
|
86
|
+
|
|
87
|
+
Templates can also be used in multiple outputs. For instance, the following would align `speech.mp3` with `transcript.txt` and then split the audio by the segments found in the transcript, and store separate audio and timeline files for each part.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
echogarden align speech.mp3 transcript.txt parts/[segment].m4a parts/[segment].json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Loading configuration from a file
|
|
94
|
+
|
|
95
|
+
Since there are many possible configuration options, it may be more convenient to store them in a configuration file.
|
|
96
|
+
|
|
97
|
+
When a file named `echogarden.config` is found at the current directory, it will be loaded automatically and its content would be used as default options. You can also specify a particular configuration file path with the option `--config=path/to/your-config-file.config`.
|
|
98
|
+
|
|
99
|
+
The configuration file format is simple and has a dedicated section for each command (all `speak-` commands are grouped together under `speak`):
|
|
100
|
+
|
|
101
|
+
```conf
|
|
102
|
+
[speak]
|
|
103
|
+
|
|
104
|
+
# Engine for synthesis:
|
|
105
|
+
engine = sapi
|
|
106
|
+
|
|
107
|
+
# Voice for synthesis (case-insensitive, can be a search pattern):
|
|
108
|
+
voice = zira
|
|
109
|
+
|
|
110
|
+
[transcribe]
|
|
111
|
+
|
|
112
|
+
# Engine for recognition:
|
|
113
|
+
engine = whisper
|
|
114
|
+
|
|
115
|
+
# Whisper model to use:
|
|
116
|
+
whisper.model = tiny
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### JSON configuration file
|
|
120
|
+
|
|
121
|
+
You can also use a JSON configuration file format instead, if preferred.
|
|
122
|
+
|
|
123
|
+
Name your file `echogarden.config.json`:
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"speak": {
|
|
127
|
+
"engine": "sapi",
|
|
128
|
+
"voice": "zira"
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
"transcribe": {
|
|
132
|
+
"engine": "whisper",
|
|
133
|
+
"whisper": {
|
|
134
|
+
"model": "tiny"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Flattened property names are also accepted:
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"transcribe": {
|
|
144
|
+
"engine": "whisper",
|
|
145
|
+
"whisper.model": "tiny"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Other operations
|
|
151
|
+
|
|
152
|
+
### Speech translation
|
|
153
|
+
|
|
154
|
+
**Task**: given an audio file containing speech in one language, transcribe it in a second language. The translated transcript should be generated directly from the speech itself, without an intermediate translation step.
|
|
155
|
+
|
|
156
|
+
This will detect the spoken language, apply speech translation to English, and play the original audio, synced with the translated transcript:
|
|
157
|
+
```bash
|
|
158
|
+
echogarden translate speech.mp3
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
To specify the source and target languages explicitly, use the `sourceLanguage` and `targetLanguage` options:
|
|
162
|
+
```bash
|
|
163
|
+
echogarden translate speech.mp3 transcript.txt --sourceLanguage=es --targetLanguage=en
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Note**: currently, only English is supported as target language. This is a limitation of the `whisper` Engine, which is the only one used for speech translation, at this time.
|
|
167
|
+
|
|
168
|
+
### Language detection
|
|
169
|
+
|
|
170
|
+
**Task**: given audio or textual input, try to identify which language it is spoken or written in.
|
|
171
|
+
|
|
172
|
+
Try to identify the language of an audio file containing speech, and print the probabilities to the terminal:
|
|
173
|
+
```bash
|
|
174
|
+
echogarden detect-speech-language speech.mp3
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Try to identify the language of a text file, and print the probabilities to the terminal:
|
|
178
|
+
```bash
|
|
179
|
+
echogarden detect-text-language story.txt
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Try to identify the language of a text file, and store the probabilities in a JSON file:
|
|
183
|
+
```bash
|
|
184
|
+
echogarden detect-text-language story.txt detection-results.json
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Voice activity detection
|
|
188
|
+
|
|
189
|
+
**Task**: given an audio file, try to classify which parts of the audio contain speech, and which don't.
|
|
190
|
+
|
|
191
|
+
This would apply VAD and play the audio, synchronized with `speech` and `nonspeech` indicators, printed to the terminal.
|
|
192
|
+
```bash
|
|
193
|
+
echogarden detect-voice-activity speech.mp3
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
This would apply VAD and store the results in a timeline JSON file.
|
|
197
|
+
```bash
|
|
198
|
+
echogarden detect-voice-activity speech.mp3 timeline.json
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Speech denoising
|
|
202
|
+
|
|
203
|
+
**Task**: try to reduce the amount of background noise in a spoken recording.
|
|
204
|
+
|
|
205
|
+
This would apply denoising and play the denoised audio:
|
|
206
|
+
```bash
|
|
207
|
+
echogarden denoise speech.mp3
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
This would apply denoising, and save the denoised audio to a file:
|
|
211
|
+
```bash
|
|
212
|
+
echogarden denoise speech.mp3 denoised-speech.mp3
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Misc.
|
|
216
|
+
|
|
217
|
+
#### `list-tts-voices`
|
|
218
|
+
|
|
219
|
+
Shows a list of TTS voices for a given engine:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
echogarden list-tts-voices google-cloud
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Stores the voice list in a JSON file:
|
|
226
|
+
```bash
|
|
227
|
+
echogarden list-tts-voices google-cloud google-cloud-voices.json
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### `install`, `uninstall` and `list-packages`
|
|
231
|
+
|
|
232
|
+
* `install`: install one or more expansion packages
|
|
233
|
+
* `uninstall`: uninstall one or more expansion packages
|
|
234
|
+
* `list-packages`: list installed packages
|
package/docs/Engines.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
# Supported engines
|
|
3
|
+
|
|
4
|
+
## Text to speech
|
|
5
|
+
|
|
6
|
+
**Offline**:
|
|
7
|
+
* [VITS](https://github.com/jaywalnut310/vits) (`vits`): a high-quality end-to-end neural speech synthesis model. Currently available models were trained by Michael Hansen as part of his [Piper speech synthesis system](https://github.com/rhasspy/piper). Supports English (US, UK), Spanish, Brazilian Portuguese, Italian, French, German, Dutch, Norwegian, Danish, Finnish, Polish, Ukrainian, Catalan, Kazakh, Nepali, Vietnamese and Chinese. You can listen to audio examples of all voices and languages on [Piper's samples page](https://rhasspy.github.io/piper-samples/).
|
|
8
|
+
* [SVOX Pico](https://github.com/naggety/picotts) (`pico`): a diphone-based synthesizer. Supports English (US, UK), Spanish, Italian, French, and German.
|
|
9
|
+
* [Flite](https://github.com/festvox/flite) (`flite`): a diphone-based synthesizer. 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 formant-based synthesizer. Supports 100+ languages.
|
|
11
|
+
* [SAM (Software Automatic Mouth)](https://github.com/discordier/sam) (`sam`): a classic "robot" speech synthesizer from 1982. English only.
|
|
12
|
+
|
|
13
|
+
**Offline, Windows only**:
|
|
14
|
+
|
|
15
|
+
_Note_: the SAPI-based engines require manually installing the [`winax` npm package](https://www.npmjs.com/package/winax) by running `npm install winax -g`.
|
|
16
|
+
|
|
17
|
+
`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.
|
|
18
|
+
|
|
19
|
+
* [SAPI](https://en.wikipedia.org/wiki/Microsoft_Speech_API) (`sapi`): Microsoft Speech API. Supports the system's language voices, as well as voices produced by third-party vendors, like Ivona, NeoSpeech, Acapela, Cepstral, CereProc, Nuance, AT&T, Loquendo, ScanSoft and others (note that only 64-bit voices are supported, which makes it incompatible with a significant portion of older voices).
|
|
20
|
+
|
|
21
|
+
* [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.
|
|
22
|
+
|
|
23
|
+
**Remote or self-hosted servers**:
|
|
24
|
+
* [Coqui TTS](https://github.com/coqui-ai/TTS) server (`coqui-server`)
|
|
25
|
+
|
|
26
|
+
**Cloud-based**:
|
|
27
|
+
* [Google Cloud](https://cloud.google.com/text-to-speech) (`google-cloud`)
|
|
28
|
+
* [Azure Cognitive Services](https://azure.microsoft.com/en-us/products/cognitive-services/text-to-speech/) (`microsoft-azure`)
|
|
29
|
+
* [Amazon Polly](https://aws.amazon.com/polly/) (`amazon-polly`)
|
|
30
|
+
* [Elevenlabs](https://beta.elevenlabs.io/) (`elevenlabs`)
|
|
31
|
+
|
|
32
|
+
**Cloud-based (unofficial)**:
|
|
33
|
+
|
|
34
|
+
These cloud-based engines connect to public-facing cloud APIs that are not officially publicized by their operators. They are included for experimental purposes only, and may be removed in the future:
|
|
35
|
+
|
|
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) for each language.
|
|
37
|
+
* 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
|
+
* 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
|
+
|
|
40
|
+
## Speech to text
|
|
41
|
+
|
|
42
|
+
**Offline**:
|
|
43
|
+
* [OpenAI Whisper](https://github.com/openai/whisper) (`whisper`): high accuracy transformer-based model. 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.
|
|
44
|
+
* [Vosk](https://github.com/alphacep/vosk-api) (`vosk`): models available for [25+ languages](https://alphacephei.com/vosk/models). _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 download a model yourself and specify its directory path via the `vosk.modelPath` option.
|
|
45
|
+
* [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
|
+
|
|
47
|
+
**Cloud based**:
|
|
48
|
+
* [Google Cloud](https://cloud.google.com/speech-to-text) (`google-cloud`)
|
|
49
|
+
* [Azure Cognitive Services](https://azure.microsoft.com/en-us/products/cognitive-services/speech-to-text/) (`microsoft-azure`)
|
|
50
|
+
* [Amazon Transcribe](https://aws.amazon.com/transcribe/) (`amazon-transcribe`)
|
|
51
|
+
|
|
52
|
+
## Speech to transcript alignment
|
|
53
|
+
|
|
54
|
+
* 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.
|
|
55
|
+
* 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.
|
|
56
|
+
* 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 (only supports audio inputs that are 30 seconds or less).
|
|
57
|
+
|
|
58
|
+
## Speech translation
|
|
59
|
+
|
|
60
|
+
* [Whisper](https://github.com/openai/whisper) (`whisper`): the Whisper model can transcribe speech in any one of its supported languages and output a transcript directly translated to English. Other languages are not supported as targets.
|
|
61
|
+
|
|
62
|
+
## Language detection
|
|
63
|
+
|
|
64
|
+
**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
|
+
* [Silero Language Classifier](https://github.com/snakers4/silero-vad/wiki/Other-Models) (`silero`): a speech language classification model by Silero.
|
|
67
|
+
|
|
68
|
+
**Written language detection**:
|
|
69
|
+
* [TinyLD](https://www.npmjs.com/package/tinyld) (`tinyld`): a simple language detection library.
|
|
70
|
+
* [FastText](https://github.com/facebookresearch/fastText) (`fasttext`): a library for word representations and sentence classification by Facebook research.
|
|
71
|
+
|
|
72
|
+
## Voice activity detection
|
|
73
|
+
|
|
74
|
+
* [WebRTC VAD](https://github.com/dpirch/libfvad) (`webrtc`): a voice activity detector. Originally from the Chromium source code.
|
|
75
|
+
* [Silero VAD](https://github.com/snakers4/silero-vad) (`silero`): a voice activity detection model by Silero.
|
|
76
|
+
* [RNNoise](https://github.com/xiph/rnnoise) (`rnnoise`): uses RNNoise's speech probabilities output for each audio frame as a VAD metric.
|
|
77
|
+
|
|
78
|
+
## Speech denoising
|
|
79
|
+
|
|
80
|
+
* [RNNoise](https://github.com/xiph/rnnoise) (`rnnoise`): a noise suppression library based on a recurrent neural network.
|
package/docs/Licenses.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Echogarden components licensing
|
|
2
|
+
|
|
3
|
+
## Engines and libraries:
|
|
4
|
+
|
|
5
|
+
* `onnxruntime-node`: [MIT License](https://github.com/microsoft/onnxruntime/blob/main/LICENSE)
|
|
6
|
+
* `espeak`: [GNU GPL v3](https://github.com/espeak-ng/espeak-ng/blob/master/COPYING)
|
|
7
|
+
* `flite`: [BSD License](https://github.com/festvox/flite/blob/master/COPYING)
|
|
8
|
+
* `pico`: [Apache License 2.0](https://github.com/gmn/nanotts/blob/master/LICENSE)
|
|
9
|
+
* `sam`: [Abandonware / fair-use / unknown](https://github.com/discordier/sam#license)
|
|
10
|
+
* `vosk` [Apache License 2.0](https://github.com/alphacep/vosk-api/blob/master/COPYING)
|
|
11
|
+
* `tinyld` [MIT License](https://github.com/komodojp/tinyld/blob/develop/license)
|
|
12
|
+
* `fasttext`: [MIT License](https://github.com/loretoparisi/fasttext.js/blob/master/LICENSE)
|
|
13
|
+
* `fvad` [BSD-3-Clause](https://github.com/cpuimage/WebRTC_VAD/blob/master/LICENSE)
|
|
14
|
+
* `kissfft`: [BSD-3-Clause](https://github.com/mborgerding/kissfft/blob/master/COPYING)
|
|
15
|
+
* `rnnoise`: [BSD-3-Clause](https://github.com/xiph/rnnoise/blob/master/COPYING)
|
|
16
|
+
* `sonic`: [Apache License 2.0](https://github.com/waywardgeek/sonic/blob/master/LICENSE)
|
|
17
|
+
* `speex-resampler`: [BSD-3-Clause](https://github.com/xiph/speexdsp/blob/master/COPYING)
|
|
18
|
+
* `rubberband`: [GNU GPL v2](https://github.com/breakfastquay/rubberband/blob/default/COPYING)
|
|
19
|
+
* `compromise`: [MIT License](https://github.com/spencermountain/compromise/blob/master/LICENSE)
|
|
20
|
+
* `cldr-segmentation`: [MIT License](https://github.com/camertron/cldr-segmentation.js/blob/master/LICENSE)
|
|
21
|
+
* `jieba-wasm`: [MIT License](https://github.com/fengkx/jieba-wasm/blob/master/LICENSE)
|
|
22
|
+
|
|
23
|
+
## Package repository
|
|
24
|
+
|
|
25
|
+
There is a variety of voices, models and binaries served from the repository.
|
|
26
|
+
|
|
27
|
+
All are freely distributable, with varying licenses:
|
|
28
|
+
* Flite voices (`flite-`): [BSD License](https://github.com/festvox/flite/blob/master/COPYING)
|
|
29
|
+
* SVOX Pico resources (`pico-`): [Apache License 2.0](https://github.com/gmn/nanotts/blob/master/LICENSE)
|
|
30
|
+
* Silero VAD (`silero-vad`) and Silero language classifier (`silero-lang-classifier-95`): [MIT License](https://github.com/snakers4/silero-vad/blob/master/LICENSE)
|
|
31
|
+
* Silero speech recognition models (`silero-en-`, `silero-de-`, `silero-es-`, `silero-ua-`): [BY-NC-SA](https://github.com/snakers4/silero-models/blob/master/LICENSE)
|
|
32
|
+
* 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 individual license for each model in the model cards on the [samples page](https://rhasspy.github.io/piper-samples/)). The Piper application itself is published under the [MIT License](https://github.com/rhasspy/piper/blob/master/LICENSE.md)
|
|
33
|
+
* Whisper pre-trained models (`whisper-`): [MIT License](https://github.com/openai/whisper/blob/main/LICENSE)
|
|
34
|
+
|
|
35
|
+
Tool binary distributions:
|
|
36
|
+
* FFMpeg: [LGPL, GPL v2 and GPL v3 Licenses](https://github.com/FFmpeg/FFmpeg)
|
|
37
|
+
* SoX: [GPL v2 License]()
|
package/docs/Options.md
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Configuration options reference
|
|
2
|
+
|
|
3
|
+
For a comprehensive list of all supported engines: see [this page](Engines.md).
|
|
4
|
+
|
|
5
|
+
## Synthesis
|
|
6
|
+
|
|
7
|
+
Applicable to CLI commands: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`.
|
|
8
|
+
|
|
9
|
+
General:
|
|
10
|
+
* `engine`: identifier of the synthesis engine to use, such as `espeak` or `vits`.
|
|
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
|
|
13
|
+
* `voiceGender`: gender of the voice to use. Optional
|
|
14
|
+
* `speed`: speech rate factor, relative to default. In the range `0.1`..`10.0`. Defaults to `1.0`
|
|
15
|
+
* `pitch`: pitch factor, relative to default. In the range `0.1`..`10.0`. Defaults to `1.0`
|
|
16
|
+
* `pitchVariation`: pitch variation factor. In the range `0.1`..`10.0`. Defaults to `1.0`
|
|
17
|
+
* `ssml`: the input is SSML. Defaults to `false`
|
|
18
|
+
* `sentenceEndPause`: pause duration (seconds) at end of sentence. Defaults to `0.75`
|
|
19
|
+
* `segmentEndPause` pause duration (seconds) at end of segment. Defaults to `1.0`
|
|
20
|
+
|
|
21
|
+
Post-processing:
|
|
22
|
+
* `postProcessing.normalizeAudio` should normalize output audio. Defaults to `true`
|
|
23
|
+
* `postProcessing.targetPeakDb` target peak (decibels) for normalization. Defaults to `-3`
|
|
24
|
+
* `postProcessing.maxIncreaseDb` max gain increase (decibels) when performing normalization. Defaults to `30`
|
|
25
|
+
* `postProcessing.speed`: target speed for time stretching. Defaults to `1.0`
|
|
26
|
+
* `postProcessing.pitch`: target pitch for pitch shifting. Defaults to `1.0`
|
|
27
|
+
* `postProcessing.timePitchShiftingMethod` method for time and pitch shifting. Can be `sonic` or `rubberband`. Defaults to `sonic`
|
|
28
|
+
* `postProcessing.rubberband`: prefix for RubberBand options (TODO)
|
|
29
|
+
|
|
30
|
+
VITS:
|
|
31
|
+
* `vits.speakerId`: speaker ID, for VITS models that support multiple speakers
|
|
32
|
+
|
|
33
|
+
eSpeak-ng:
|
|
34
|
+
* `espeak.rate`: speech rate, in eSpeak units. Overrides `speed` when set
|
|
35
|
+
* `espeak.pitch`: pitch, in eSpeak units. Overrides `pitch` when set
|
|
36
|
+
* `espeak.pitchRange`: pitch range, in eSpeak units. Overrides `pitchVariation` when set
|
|
37
|
+
|
|
38
|
+
SAM:
|
|
39
|
+
* `sam.pitch`: pitch value, between `0`..`255`, optional. Overrides `pitch` when set
|
|
40
|
+
* `sam.speed`: speed value, between `0`..`255`, optional. Overrides `speed` when set
|
|
41
|
+
* `sam.mouth`: mouth value, between `0`..`255` (defaults to `128`)
|
|
42
|
+
* `sam.throat`: throat value, between `0`..`255` (defaults to `128`)
|
|
43
|
+
|
|
44
|
+
SAPI:
|
|
45
|
+
* `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
|
|
46
|
+
|
|
47
|
+
Microsoft Speech Platform:
|
|
48
|
+
* `msspeech.rate`: equivalent units and effect to the SAPI speech rate
|
|
49
|
+
|
|
50
|
+
Coqui Server:
|
|
51
|
+
* `coquiServer.serverUrl`: server URL
|
|
52
|
+
* `coquiServer.speakerId`: speaker ID (if applicable)
|
|
53
|
+
|
|
54
|
+
Google Cloud:
|
|
55
|
+
* `googleCloud.apiKey`: API key (required)
|
|
56
|
+
* `googleCloud.pitchDeltaSemitones`: pitch delta in semitones. Overrides `pitch` when set
|
|
57
|
+
* `googleCloud.customVoice.model`: name of custom voice
|
|
58
|
+
* `googleCloud.customVoice.reportedUsage`: reported usage of custom voice
|
|
59
|
+
|
|
60
|
+
Azure Cognitive Services:
|
|
61
|
+
* `microsoftAzure.subscriptionKey`: subscription key (required)
|
|
62
|
+
* `microsoftAzure.serviceRegion`: service region (required)
|
|
63
|
+
* `microsoftAzure.pitchDeltaHz`: pitch delta in Hz. Overrides `pitch` when set
|
|
64
|
+
|
|
65
|
+
Amazon Polly:
|
|
66
|
+
* `amazonPolly.region`: region (required)
|
|
67
|
+
* `amazonPolly.accessKeyId`: access key ID (required)
|
|
68
|
+
* `amazonPolly.secretAccessKey`: secret access key (required)
|
|
69
|
+
* `amazonPolly.pollyEngine`: Amazon Polly engine kind, can be `standard` or `neural`. Defaults to `neural`
|
|
70
|
+
* `amazonPolly.lexiconNames`: TODO
|
|
71
|
+
|
|
72
|
+
Elevenlabs:
|
|
73
|
+
* `elevenLabs.apiKey`: API key (required)
|
|
74
|
+
* `elevenLabs.stability`: stability
|
|
75
|
+
* `elevenLabs.similarityBoost`: similarity boost
|
|
76
|
+
|
|
77
|
+
Google Translate:
|
|
78
|
+
* `googleTranslate.tld`: top level domain to to connect to. Can change the dialect of the voices 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
|
+
|
|
80
|
+
Microsoft Edge:
|
|
81
|
+
* `microsoftEdge.trustedClientToken`: trusted client token (required). A special token required to use the service
|
|
82
|
+
* `microsoftEdge.pitchDeltaHz`: pitch delta in Hz. Overrides `pitch` when set
|
|
83
|
+
|
|
84
|
+
## Recognition
|
|
85
|
+
|
|
86
|
+
Applicable to CLI command: `transcribe`.
|
|
87
|
+
|
|
88
|
+
General:
|
|
89
|
+
* `engine`: identifier of the recognition engine to use, such as `whisper` or `vosk`
|
|
90
|
+
* `language`: language code for the audio, like `en`, `fr`, `en-US`, `pt-BR`. Auto-detected if not set
|
|
91
|
+
|
|
92
|
+
Whisper:
|
|
93
|
+
* `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`. Defaults to `tiny`
|
|
94
|
+
|
|
95
|
+
Vosk:
|
|
96
|
+
* `vosk.modelPath`: path to the Vosk model to be used
|
|
97
|
+
|
|
98
|
+
Silero:
|
|
99
|
+
* `silero.modelPath`: path to a Silero model. Note that latest `en`, `de`, `fr` and `uk` models are automatically installed when needed based on the selected language. This should only be used to manually specify a different model, otherwise specify `language` instead
|
|
100
|
+
|
|
101
|
+
Google Cloud:
|
|
102
|
+
* `googleCloud.apiKey`: Google Cloud API key (required)
|
|
103
|
+
* `googleCloud.alternativeLanguageCodes`: TODO
|
|
104
|
+
* `googleCloud.profanityFilter`: censor profanity. Defaults to `false`
|
|
105
|
+
* `googleCloud.autoPunctuation`: add punctuation automatically. Defaults to `true`
|
|
106
|
+
* `googleCloud.useEnhancedModel`: use enhanced model. Defaults to `true`
|
|
107
|
+
|
|
108
|
+
Azure Cognitive Services:
|
|
109
|
+
* `azureCognitiveServices.subscriptionKey`: subscription key (required)
|
|
110
|
+
* `azureCognitiveServices.serviceRegion`: service region (required)
|
|
111
|
+
|
|
112
|
+
Amazon Transcribe:
|
|
113
|
+
* `amazonTranscribe.region`: region (required)
|
|
114
|
+
* `amazonTranscribe.accessKeyId`: access key ID (required)
|
|
115
|
+
* `amazonTranscribe.secretAccessKey`: secret access key (required)
|
|
116
|
+
|
|
117
|
+
## Alignment
|
|
118
|
+
|
|
119
|
+
Applicable to CLI command: `align`.
|
|
120
|
+
|
|
121
|
+
General:
|
|
122
|
+
* `method`: what alignment algorithm to use, can be `dtw`, `dtw-ra` or `whisper`. Defaults to `dtw`
|
|
123
|
+
* `language`: language code for the audio and transcript, like `en`, `fr`, `en-US`, `pt-BR`. Auto-detected if not set
|
|
124
|
+
|
|
125
|
+
DTW:
|
|
126
|
+
* `dtw.windowDuration`: time duration (in seconds) of the Sakoe-Chiba window when performing DTW alignment. Defaults to `120`. If your audio is longer than two minutes, consider increasing this value for better results. Note that a higher value would consume quadratically larger amounts of memory. A value of `600` (ten minutes) would already require several Gigabytes of memory when the audio duration is 10 minutes or greater.
|
|
127
|
+
|
|
128
|
+
DTW-RA only:
|
|
129
|
+
* `dtw.recognition`: prefix for providing custom recognition options when using `dtw-ra` method, for example: setting `dtw.recognition.engine = silero`
|
|
130
|
+
* `dtw.phoneAlignmentMethod`: algorithm to use when aligning phones: can either be set to `dtw` or `interpolate`. Defaults to `dtw`
|
|
131
|
+
|
|
132
|
+
## Speech translation
|
|
133
|
+
|
|
134
|
+
Applicable to CLI command: `translate-speech`.
|
|
135
|
+
|
|
136
|
+
General:
|
|
137
|
+
* `engine`: only `whisper` supported
|
|
138
|
+
|
|
139
|
+
Whisper:
|
|
140
|
+
* `whisper.engine`: Whisper engine to use (multilingual engines only). Defaults to `tiny`
|
|
141
|
+
|
|
142
|
+
## Language detection
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Spoken language detection
|
|
146
|
+
|
|
147
|
+
Applicable to CLI command: `detect-speech-langauge`.
|
|
148
|
+
|
|
149
|
+
* `engine`: `silero` or `whisper`. Defaults to `silero`
|
|
150
|
+
* `whisper`: whisper options prefix, can be used like `whisper.model = base` to set options for the Whisper engine. See Whisper options on the recognition section
|
|
151
|
+
|
|
152
|
+
### Written language detection
|
|
153
|
+
|
|
154
|
+
Applicable to CLI command: `detect-text-langauge`.
|
|
155
|
+
|
|
156
|
+
* `engine`: `tinyld` or `fasttext`. Defaults to `tinyld`
|
|
157
|
+
|
|
158
|
+
## Voice activity detection
|
|
159
|
+
|
|
160
|
+
Applicable to CLI command: `detect-voice-activity`.
|
|
161
|
+
|
|
162
|
+
General:
|
|
163
|
+
* `engine`: VAD engine to use. Can be `webrtc`, `silero` or `rnnoise`. Defaults to `webrtc`
|
|
164
|
+
* `activityThreshold`: minimum predicted probability for determining a frame as having speech activity. Defaults to `0.5`
|
|
165
|
+
|
|
166
|
+
WebRTC:
|
|
167
|
+
* `webrtc.frameDuration`: WebRTC frame duration (ms). Can be `10`, `20` or `30`. Defaults to `30`
|
|
168
|
+
* `webrtc.mode`: WebRTC mode (aggressiveness). Can be `0`, `1`, `2` or `3`. Defaults to `1`
|
|
169
|
+
|
|
170
|
+
Silero:
|
|
171
|
+
* `silero.frameDuration`: Silero frame duration (ms). Can be `30`, `60` or `90`. Defaults to `90`
|
|
172
|
+
|
|
173
|
+
## Speech denoising
|
|
174
|
+
|
|
175
|
+
Applicable to CLI command: `denoise`.
|
|
176
|
+
|
|
177
|
+
General:
|
|
178
|
+
* `engine`: can only be `rnnoise`
|
|
179
|
+
|
|
180
|
+
Postprocessing:
|
|
181
|
+
* `postProcessing.normalizeAudio` should normalize output audio. Defaults to `false`
|
|
182
|
+
* `postProcessing.targetPeakDb` target peak (decibels) for normalization. Defaults to `-3`
|
|
183
|
+
* `postProcessing.maxIncreaseDb` max gain increase (decibels) when performing normalization. Defaults to `30`
|
|
184
|
+
* `postProcessing.dryMixGainDb` gain (decibels) of dry (original) signal to mix back to the denoised output. Defaults to `-20`
|
|
185
|
+
|
|
186
|
+
## Voice list request
|
|
187
|
+
|
|
188
|
+
Applicable to CLI command: `list-voices`.
|
|
189
|
+
|
|
190
|
+
* `language`: language code to filter by (optional)
|
|
191
|
+
* `voice`: name or name pattern to filter by (optional)
|
|
192
|
+
* `voiceGender`: gender to filter by (optional)
|
package/docs/Roadmap.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
1. Publish a working command line application
|
|
4
|
+
1. Smooth out any significant bugs
|
|
5
|
+
1. Ensure platform support
|
|
6
|
+
1. Add missing features, options or commands to the CLI
|
|
7
|
+
1. Stabilize the programmatic API
|
|
8
|
+
1. Open up the programmatic API. Add any extra methods needed for that to happen
|
|
9
|
+
1. Develop a WebSocket server that closely mirrors the API
|
|
10
|
+
1. Develop a basic Web-based client app
|
|
11
|
+
1. Modify the CLI app to internally launch and communicate with a WebSocket service
|
|
12
|
+
1. Add parallelism to the CLI and WebSocket server
|
|
13
|
+
1. Further improve the client app
|
|
14
|
+
1. Start porting small subsets of the code to run in the browser
|
|
15
|
+
1. Port some of the speech API to the browser
|
|
16
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Technical overview and Q&A
|
|
2
|
+
|
|
3
|
+
* Echogarden is written in TypeScript and targets the Node.js platform
|
|
4
|
+
* It uses ESM modules and latest ECMAScript and TypeScript features
|
|
5
|
+
* It does not depend on essential binary executables. Instead, all of its engines either use pure JavaScript, WebAssembly, WASI, or the ONNX runtime (with some exceptions: the CLI does use executables, loaded from an expansion package, for the SoX tool [and `ffmpeg` as well], which is used only for audio playback and recording. This simplifies the installation and ensures a non-buggy version is used. Since SoX `v14.4.2` is broken on Windows, it bundles `v14.4.1`).
|
|
6
|
+
* It does not depend on essential native modules requiring compilation with `node-gyp`. This greatly simplifies and ensures the success of the installation for end-users (the ONNX runtime bundles precompiled NAPI modules for all supported platforms - it doesn't require any compilation during installation)
|
|
7
|
+
|
|
8
|
+
## Package system
|
|
9
|
+
|
|
10
|
+
Echogarden uses its own package system to download and install various components as needed. These components can be TTS voices, STT models, or other types of models and data.
|
|
11
|
+
|
|
12
|
+
Packages are downloaded as `.tar.gz` files, and are extracted to `[data-folder]/packages/[package-name]`. Each package has its own subdirectory.
|
|
13
|
+
|
|
14
|
+
`[data-folder]` is located at:
|
|
15
|
+
* `%AppData%\Local\echogarden` on Windows
|
|
16
|
+
* `Users/User/Library/Application Support/echogarden` on macOS
|
|
17
|
+
* `/home/user/.local/share/echogarden` on Linux
|
|
18
|
+
|
|
19
|
+
By using downloadable packages, the installed size is made significantly smaller and the installation faster. The total size of all available packages is currently about 11.4GB (6.8GB compressed). Another advantage of using a data folder is that the data does not need to be re-downloaded when the program is updated.
|
|
20
|
+
|
|
21
|
+
## Can the base install size be made smaller?
|
|
22
|
+
|
|
23
|
+
The installed (uncompressed) size, including dependencies, is around 350MB. This is without any models or voices, which are downloaded as needed.
|
|
24
|
+
|
|
25
|
+
Currently, the biggest contributors to the size are:
|
|
26
|
+
|
|
27
|
+
* `onnxruntime-node` (NAPI): 92MB
|
|
28
|
+
* `kuromoji` (JavaScript) 40MB
|
|
29
|
+
* `ffmpeg` (WASM): 24MB
|
|
30
|
+
* `flite-wasi` (WASI): 20MB
|
|
31
|
+
* `espeak-ng-emscripten` (WASM): 18MB
|
|
32
|
+
|
|
33
|
+
`onnxruntime-node` is big because it bundles pre-compiled binaries for multiple platforms. `kuromoji` is large because of its dictionary files and some unessential test code it bundles. The other three packages include large WASM binaries.
|
|
34
|
+
|
|
35
|
+
So, yes, in the future it may be possible to reduce the core installed size by dynamically installing some of these dependencies, as npm packages, only when needed.
|
|
36
|
+
|
|
37
|
+
## Since the code is almost all JavaScript and WASM, why can't it just run in a web browser?
|
|
38
|
+
|
|
39
|
+
It is technically possible, overall, since its core components: `espeak-ng` and `onnxruntime` both have WASM ports. Actually, `onnxruntime-web`, unlike `onnxruntime-node` can also make use of the GPU via WebGL, and in the future, [it will support WebGPU](https://github.com/microsoft/onnxruntime/issues/11695), which should give a performance boost.
|
|
40
|
+
|
|
41
|
+
However, it is a lot of work, and only a subset of the engines can be supported (no cloud engines, in particular). There are several reasons why the web may not be the most effective platform:
|
|
42
|
+
|
|
43
|
+
* Significantly slower inference when running on CPU
|
|
44
|
+
* No cross-domain network connectivity - can't connect to Google Cloud, Microsoft, Amazon etc. without a proxy
|
|
45
|
+
* Large initial download size would make it too heavy and slow to load as part of a standard web page directly
|
|
46
|
+
* Will require a virtual file system to store models and make use of downloadable packages
|
|
47
|
+
* Requires duplicating a lot of prior work and increasing code complexity
|
|
48
|
+
* Possibly lots of issues with inconsistent browser support and browser security constraints
|
|
49
|
+
* Not future-proof. Due to changing restrictions of browsers, the runtime environment is not guaranteed be reliably reproducible in the future, meaning that it may need continuous maintenance to ensure it keeps working on the newest browsers
|
|
50
|
+
|
|
51
|
+
It remains to be seen what type of use cases would justify this kind of endeavor. I designed the tool to make the local installation extremely easy and issue-free. I guess it could look "impressive" to be able to run it in a browser, and may be come as a nice "toy" or "technology demonstration", and get some attention, but it may eventually turn out to be simpler and more practical to just install a local instance and connect to it from the browser via a WebSocket.
|
|
52
|
+
|
|
53
|
+
Another option is to include some of the TTS modules in a browser extension and register TTS voices on the browser's Web Speech API using the [`chrome.ttsEngine`](https://developer.chrome.com/docs/extensions/reference/ttsEngine/) extension API. That sounds reasonable, but due to the size and complexity of such an extension, it is not certain it would be approved by the Chrome Web Store. Also, `chrome.ttsEngine` is currently only supported on Chromium browsers, but not on Firefox.
|
|
54
|
+
|
|
55
|
+
## Why can't I use `stdin` and `stdout` to pipe into and out from the CLI app?
|
|
56
|
+
|
|
57
|
+
I don't think that `stdin` and `stdout` are able to capture the type of complex, multi-message, bidirectional communication that is needed for a full speech processing service. When a WebSocket server is implemented, it will fulfill all these needs, and more. It would provide a uniform interface for all external clients, and would also be launched and used internally by the CLI itself. It would enable the CLI to do complex asynchronous and parallel operations it can't currently do, like transcribing a live input while text is written to the terminal and audio is played, processed and transmitted, all at the same time.
|
|
58
|
+
|
|
59
|
+
## Why does the CLI use `--option=value` and not `--option value` syntax?
|
|
60
|
+
|
|
61
|
+
I would have allowed `--option value` if I could. The reason `--option=value` syntax is used is because the options are defined using an auto-generated schema, which is different for each command. This means I don't know ahead of time which options require an extra value, like `--voice Bob`, and which don't, like `--play`, at the time the command line is parsed. This makes it difficult to intersperse switches and inputs/outputs like `echogarden speak "Hello" --play output.mp3 --voice Bob`.
|
|
62
|
+
|
|
63
|
+
In order to support a syntax like `--option value` I will need to parse the command line separately for each command, but then it would be difficult to share common options between all of them.
|
|
64
|
+
|
|
65
|
+
Also, `option=value` is more similar to the syntax used in the configuration file, which makes it more consistent, and since the CLI accepts arbitrary numbers of free arguments, it help prevent confusion on whether an argument is related to an option or is it a free one.
|
|
66
|
+
|
|
67
|
+
## Code organization
|
|
68
|
+
|
|
69
|
+
* `src`: TypeScript source code
|
|
70
|
+
* `dist`: compiled JavaScript modules
|
|
71
|
+
* `data`: various data files, including phonetic lexicons and conversion tables. `data/schemas` stores JSON schemas for all configuration options, auto-generated using [`ts-json-schema-generator`](https://github.com/vega/ts-json-schema-generator) directly from the TypeScript code, and used by the CLI to parse and validate the types of options provided
|
|
72
|
+
* `docs`: documentation
|