echogarden 2.10.2 → 3.0.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/LICENSE.MIT.md +7 -0
- package/README.md +9 -1
- package/data/lexicons/heteronyms.en.json +44 -10
- package/data/lexicons/words.en.json +726 -22
- package/data/schemas/options.json +91 -153
- package/dist/alignment/DTWMfccSequenceAlignment.js.map +1 -1
- package/dist/alignment/SemanticTextAlignment.d.ts +4 -2
- package/dist/alignment/SemanticTextAlignment.d.ts.map +1 -1
- package/dist/alignment/SemanticTextAlignment.js +7 -7
- package/dist/alignment/SemanticTextAlignment.js.map +1 -1
- package/dist/alignment/SpeechAlignment.d.ts +9 -10
- package/dist/alignment/SpeechAlignment.d.ts.map +1 -1
- package/dist/alignment/SpeechAlignment.js +23 -96
- package/dist/alignment/SpeechAlignment.js.map +1 -1
- package/dist/api/APIOptions.d.ts +1 -1
- package/dist/api/APIOptions.d.ts.map +1 -1
- package/dist/api/Alignment.d.ts +8 -6
- package/dist/api/Alignment.d.ts.map +1 -1
- package/dist/api/Alignment.js +31 -40
- package/dist/api/Alignment.js.map +1 -1
- package/dist/api/Common.d.ts +7 -0
- package/dist/api/Common.d.ts.map +1 -1
- package/dist/api/Common.js.map +1 -1
- package/dist/api/Denoising.d.ts +5 -2
- package/dist/api/Denoising.d.ts.map +1 -1
- package/dist/api/Denoising.js +15 -15
- package/dist/api/Denoising.js.map +1 -1
- package/dist/api/GlobalOptions.d.ts +2 -8
- package/dist/api/GlobalOptions.d.ts.map +1 -1
- package/dist/api/GlobalOptions.js +2 -13
- package/dist/api/GlobalOptions.js.map +1 -1
- package/dist/api/Recognition.d.ts +11 -12
- package/dist/api/Recognition.d.ts.map +1 -1
- package/dist/api/Recognition.js +32 -82
- package/dist/api/Recognition.js.map +1 -1
- package/dist/api/SourceSeparation.d.ts +7 -2
- package/dist/api/SourceSeparation.d.ts.map +1 -1
- package/dist/api/SourceSeparation.js +12 -10
- package/dist/api/SourceSeparation.js.map +1 -1
- package/dist/api/SpeechLanguageDetection.d.ts +11 -7
- package/dist/api/SpeechLanguageDetection.d.ts.map +1 -1
- package/dist/api/SpeechLanguageDetection.js +37 -30
- package/dist/api/SpeechLanguageDetection.js.map +1 -1
- package/dist/api/SpeechSearch.d.ts +4 -1
- package/dist/api/SpeechSearch.d.ts.map +1 -1
- package/dist/api/SpeechSearch.js.map +1 -1
- package/dist/api/SpeechTranslation.d.ts +10 -6
- package/dist/api/SpeechTranslation.d.ts.map +1 -1
- package/dist/api/SpeechTranslation.js +28 -26
- package/dist/api/SpeechTranslation.js.map +1 -1
- package/dist/api/Synthesis.d.ts +13 -8
- package/dist/api/Synthesis.d.ts.map +1 -1
- package/dist/api/Synthesis.js +67 -89
- package/dist/api/Synthesis.js.map +1 -1
- package/dist/api/TextLanguageDetection.d.ts +4 -2
- package/dist/api/TextLanguageDetection.d.ts.map +1 -1
- package/dist/api/TextLanguageDetection.js +4 -7
- package/dist/api/TextLanguageDetection.js.map +1 -1
- package/dist/api/TextTranslation.d.ts +4 -2
- package/dist/api/TextTranslation.d.ts.map +1 -1
- package/dist/api/TextTranslation.js +13 -24
- package/dist/api/TextTranslation.js.map +1 -1
- package/dist/api/TimelineTranslationAlignment.d.ts +6 -3
- package/dist/api/TimelineTranslationAlignment.d.ts.map +1 -1
- package/dist/api/TimelineTranslationAlignment.js +20 -11
- package/dist/api/TimelineTranslationAlignment.js.map +1 -1
- package/dist/api/TranscriptAndTranslationAlignment.d.ts +6 -4
- package/dist/api/TranscriptAndTranslationAlignment.d.ts.map +1 -1
- package/dist/api/TranscriptAndTranslationAlignment.js +11 -12
- package/dist/api/TranscriptAndTranslationAlignment.js.map +1 -1
- package/dist/api/TranslationAlignment.d.ts +6 -4
- package/dist/api/TranslationAlignment.d.ts.map +1 -1
- package/dist/api/TranslationAlignment.js +20 -21
- package/dist/api/TranslationAlignment.js.map +1 -1
- package/dist/api/VoiceActivityDetection.d.ts +9 -8
- package/dist/api/VoiceActivityDetection.d.ts.map +1 -1
- package/dist/api/VoiceActivityDetection.js +20 -43
- package/dist/api/VoiceActivityDetection.js.map +1 -1
- package/dist/audio/AudioBufferConversion.js.map +1 -1
- package/dist/audio/AudioPlayer.d.ts +1 -3
- package/dist/audio/AudioPlayer.d.ts.map +1 -1
- package/dist/audio/AudioPlayer.js +3 -188
- package/dist/audio/AudioPlayer.js.map +1 -1
- package/dist/audio/AudioUtilities.d.ts +2 -1
- package/dist/audio/AudioUtilities.d.ts.map +1 -1
- package/dist/audio/AudioUtilities.js +2 -2
- package/dist/audio/AudioUtilities.js.map +1 -1
- package/dist/build-tools/MakeTarballsForInstalledPackages.js +3 -3
- package/dist/build-tools/MakeTarballsForInstalledPackages.js.map +1 -1
- package/dist/cli/CLI.d.ts.map +1 -1
- package/dist/cli/CLI.js +139 -92
- package/dist/cli/CLI.js.map +1 -1
- package/dist/codecs/FFMpegTranscoder.d.ts +4 -3
- package/dist/codecs/FFMpegTranscoder.d.ts.map +1 -1
- package/dist/codecs/FFMpegTranscoder.js +16 -14
- package/dist/codecs/FFMpegTranscoder.js.map +1 -1
- package/dist/codecs/TIMITCodec.d.ts.map +1 -1
- package/dist/data-structures/DynamicTypedArray.d.ts.map +1 -1
- package/dist/data-structures/DynamicTypedArray.js.map +1 -1
- package/dist/data-structures/Queue.d.ts.map +1 -1
- package/dist/data-structures/WindowedList.d.ts.map +1 -1
- package/dist/data-structures/WindowedList.js.map +1 -1
- package/dist/denoising/NSNet2.d.ts +3 -2
- package/dist/denoising/NSNet2.d.ts.map +1 -1
- package/dist/denoising/NSNet2.js +4 -4
- package/dist/denoising/NSNet2.js.map +1 -1
- package/dist/denoising/RNNoise.d.ts +2 -1
- package/dist/denoising/RNNoise.d.ts.map +1 -1
- package/dist/denoising/RNNoise.js +10 -6
- package/dist/denoising/RNNoise.js.map +1 -1
- package/dist/dsp/BiquadFilter.d.ts.map +1 -1
- package/dist/dsp/DecayingPeakEstimator.d.ts.map +1 -1
- package/dist/dsp/DecayingPeakEstimator.js.map +1 -1
- package/dist/dsp/FFT.d.ts.map +1 -1
- package/dist/dsp/FFT.js +2 -1
- package/dist/dsp/FFT.js.map +1 -1
- package/dist/dsp/KWeightingFilter.d.ts.map +1 -1
- package/dist/dsp/KWeightingFilter.js.map +1 -1
- package/dist/dsp/LoudnessEstimator.d.ts.map +1 -1
- package/dist/dsp/LoudnessEstimator.js.map +1 -1
- package/dist/dsp/MFCC.d.ts +3 -2
- package/dist/dsp/MFCC.d.ts.map +1 -1
- package/dist/dsp/MFCC.js +4 -4
- package/dist/dsp/MFCC.js.map +1 -1
- package/dist/dsp/MelSpectrogram.d.ts +10 -8
- package/dist/dsp/MelSpectrogram.d.ts.map +1 -1
- package/dist/dsp/MelSpectrogram.js +31 -34
- package/dist/dsp/MelSpectrogram.js.map +1 -1
- package/dist/dsp/Rubberband.d.ts.map +1 -1
- package/dist/dsp/Rubberband.js +8 -3
- package/dist/dsp/Rubberband.js.map +1 -1
- package/dist/dsp/Sonic.d.ts.map +1 -1
- package/dist/dsp/Sonic.js +1 -1
- package/dist/dsp/Sonic.js.map +1 -1
- package/dist/dsp/SpeexResampler.d.ts.map +1 -1
- package/dist/dsp/SpeexResampler.js +1 -1
- package/dist/dsp/SpeexResampler.js.map +1 -1
- package/dist/encodings/Ascii.d.ts +1 -1
- package/dist/encodings/Ascii.d.ts.map +1 -1
- package/dist/encodings/Base64.js.map +1 -1
- package/dist/encodings/Utf16.d.ts.map +1 -1
- package/dist/encodings/Utf8.d.ts.map +1 -1
- package/dist/math/VectorMath.d.ts +1 -0
- package/dist/math/VectorMath.d.ts.map +1 -1
- package/dist/math/VectorMath.js +9 -5
- package/dist/math/VectorMath.js.map +1 -1
- package/dist/nlp/ChineseSegmentation.d.ts +1 -1
- package/dist/nlp/ChineseSegmentation.d.ts.map +1 -1
- package/dist/nlp/EspeakPhonemizer.d.ts +1 -1
- package/dist/nlp/EspeakPhonemizer.d.ts.map +1 -1
- package/dist/nlp/EspeakPhonemizer.js +2 -2
- package/dist/nlp/EspeakPhonemizer.js.map +1 -1
- package/dist/nlp/IPA.d.ts +2 -2
- package/dist/nlp/Segmentation.d.ts +1 -1
- package/dist/nlp/Segmentation.d.ts.map +1 -1
- package/dist/nlp/Segmentation.js +8 -4
- package/dist/nlp/Segmentation.js.map +1 -1
- package/dist/recognition/AmazonTranscribeSTT.d.ts +2 -1
- package/dist/recognition/AmazonTranscribeSTT.d.ts.map +1 -1
- package/dist/recognition/AmazonTranscribeSTT.js +3 -3
- package/dist/recognition/AmazonTranscribeSTT.js.map +1 -1
- package/dist/recognition/AzureCognitiveServicesSTT.d.ts +2 -1
- package/dist/recognition/AzureCognitiveServicesSTT.d.ts.map +1 -1
- package/dist/recognition/AzureCognitiveServicesSTT.js +4 -4
- package/dist/recognition/AzureCognitiveServicesSTT.js.map +1 -1
- package/dist/recognition/DeepgramSTT.d.ts +2 -1
- package/dist/recognition/DeepgramSTT.d.ts.map +1 -1
- package/dist/recognition/DeepgramSTT.js +12 -13
- package/dist/recognition/DeepgramSTT.js.map +1 -1
- package/dist/recognition/GoogleCloudSTT.d.ts +2 -1
- package/dist/recognition/GoogleCloudSTT.d.ts.map +1 -1
- package/dist/recognition/GoogleCloudSTT.js +11 -10
- package/dist/recognition/GoogleCloudSTT.js.map +1 -1
- package/dist/recognition/OpenAICloudSTT.d.ts +2 -1
- package/dist/recognition/OpenAICloudSTT.d.ts.map +1 -1
- package/dist/recognition/OpenAICloudSTT.js +6 -6
- package/dist/recognition/OpenAICloudSTT.js.map +1 -1
- package/dist/recognition/WhisperCommon.d.ts +9 -0
- package/dist/recognition/WhisperCommon.d.ts.map +1 -0
- package/dist/recognition/WhisperCommon.js +52 -0
- package/dist/recognition/WhisperCommon.js.map +1 -0
- package/dist/recognition/{WhisperCppSTT.d.ts → WhisperCppCliSTT.d.ts} +14 -16
- package/dist/recognition/WhisperCppCliSTT.d.ts.map +1 -0
- package/dist/recognition/{WhisperCppSTT.js → WhisperCppCliSTT.js} +55 -84
- package/dist/recognition/WhisperCppCliSTT.js.map +1 -0
- package/dist/recognition/WhisperSTT.d.ts +72 -85
- package/dist/recognition/WhisperSTT.d.ts.map +1 -1
- package/dist/recognition/WhisperSTT.js +384 -519
- package/dist/recognition/WhisperSTT.js.map +1 -1
- package/dist/server/Client.d.ts +2 -2
- package/dist/server/Client.d.ts.map +1 -1
- package/dist/server/Client.js.map +1 -1
- package/dist/server/Worker.d.ts +6 -7
- package/dist/server/Worker.d.ts.map +1 -1
- package/dist/server/Worker.js +42 -44
- package/dist/server/Worker.js.map +1 -1
- package/dist/source-separation/MDXNetSourceSeparation.d.ts +3 -2
- package/dist/source-separation/MDXNetSourceSeparation.d.ts.map +1 -1
- package/dist/source-separation/MDXNetSourceSeparation.js +10 -8
- package/dist/source-separation/MDXNetSourceSeparation.js.map +1 -1
- package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.d.ts +3 -2
- package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.d.ts.map +1 -1
- package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.js +5 -5
- package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.js.map +1 -1
- package/dist/speech-language-detection/SileroLanguageDetection.d.ts +5 -3
- package/dist/speech-language-detection/SileroLanguageDetection.d.ts.map +1 -1
- package/dist/speech-language-detection/SileroLanguageDetection.js +8 -8
- package/dist/speech-language-detection/SileroLanguageDetection.js.map +1 -1
- package/dist/speech-search/DTWSpeechSearch.d.ts +2 -1
- package/dist/speech-search/DTWSpeechSearch.d.ts.map +1 -1
- package/dist/speech-search/DTWSpeechSearch.js +4 -4
- package/dist/speech-search/DTWSpeechSearch.js.map +1 -1
- package/dist/subtitles/Subtitles.d.ts +13 -1
- package/dist/subtitles/Subtitles.d.ts.map +1 -1
- package/dist/subtitles/Subtitles.js +22 -22
- package/dist/subtitles/Subtitles.js.map +1 -1
- package/dist/synthesis/AwsPollyTTS.d.ts +3 -2
- package/dist/synthesis/AwsPollyTTS.d.ts.map +1 -1
- package/dist/synthesis/AwsPollyTTS.js +5 -5
- package/dist/synthesis/AwsPollyTTS.js.map +1 -1
- package/dist/synthesis/AzureCognitiveServicesTTS.d.ts +2 -1
- package/dist/synthesis/AzureCognitiveServicesTTS.d.ts.map +1 -1
- package/dist/synthesis/AzureCognitiveServicesTTS.js +3 -3
- package/dist/synthesis/AzureCognitiveServicesTTS.js.map +1 -1
- package/dist/synthesis/CoquiServerTTS.d.ts +2 -1
- package/dist/synthesis/CoquiServerTTS.d.ts.map +1 -1
- package/dist/synthesis/CoquiServerTTS.js +7 -8
- package/dist/synthesis/CoquiServerTTS.js.map +1 -1
- package/dist/synthesis/DeepgramTTS.d.ts +2 -2
- package/dist/synthesis/DeepgramTTS.d.ts.map +1 -1
- package/dist/synthesis/DeepgramTTS.js +13 -13
- package/dist/synthesis/DeepgramTTS.js.map +1 -1
- package/dist/synthesis/ElevenLabsTTS.d.ts +3 -3
- package/dist/synthesis/ElevenLabsTTS.d.ts.map +1 -1
- package/dist/synthesis/ElevenLabsTTS.js +22 -21
- package/dist/synthesis/ElevenLabsTTS.js.map +1 -1
- package/dist/synthesis/EspeakTTS.d.ts +11 -9
- package/dist/synthesis/EspeakTTS.d.ts.map +1 -1
- package/dist/synthesis/EspeakTTS.js +118 -68
- package/dist/synthesis/EspeakTTS.js.map +1 -1
- package/dist/synthesis/FliteTTS.d.ts +2 -2
- package/dist/synthesis/FliteTTS.d.ts.map +1 -1
- package/dist/synthesis/FliteTTS.js +2 -2
- package/dist/synthesis/FliteTTS.js.map +1 -1
- package/dist/synthesis/GnuSpeechTTS.d.ts +2 -2
- package/dist/synthesis/GnuSpeechTTS.d.ts.map +1 -1
- package/dist/synthesis/GnuSpeechTTS.js +1 -1
- package/dist/synthesis/GnuSpeechTTS.js.map +1 -1
- package/dist/synthesis/GoogleCloudTTS.d.ts +3 -2
- package/dist/synthesis/GoogleCloudTTS.d.ts.map +1 -1
- package/dist/synthesis/GoogleCloudTTS.js +15 -14
- package/dist/synthesis/GoogleCloudTTS.js.map +1 -1
- package/dist/synthesis/GoogleTranslateTTS.d.ts +3 -2
- package/dist/synthesis/GoogleTranslateTTS.d.ts.map +1 -1
- package/dist/synthesis/GoogleTranslateTTS.js +11 -11
- package/dist/synthesis/GoogleTranslateTTS.js.map +1 -1
- package/dist/synthesis/KokoroTTS.d.ts +4 -4
- package/dist/synthesis/KokoroTTS.d.ts.map +1 -1
- package/dist/synthesis/KokoroTTS.js +11 -10
- package/dist/synthesis/KokoroTTS.js.map +1 -1
- package/dist/synthesis/MicrosoftEdgeTTS.d.ts +4 -3
- package/dist/synthesis/MicrosoftEdgeTTS.d.ts.map +1 -1
- package/dist/synthesis/MicrosoftEdgeTTS.js +41 -20
- package/dist/synthesis/MicrosoftEdgeTTS.js.map +1 -1
- package/dist/synthesis/OpenAICloudTTS.d.ts +2 -2
- package/dist/synthesis/OpenAICloudTTS.d.ts.map +1 -1
- package/dist/synthesis/OpenAICloudTTS.js +6 -5
- package/dist/synthesis/OpenAICloudTTS.js.map +1 -1
- package/dist/synthesis/SamTTS.d.ts +2 -1
- package/dist/synthesis/SamTTS.d.ts.map +1 -1
- package/dist/synthesis/SamTTS.js +2 -2
- package/dist/synthesis/SamTTS.js.map +1 -1
- package/dist/synthesis/SapiTTS.d.ts +2 -2
- package/dist/synthesis/SapiTTS.d.ts.map +1 -1
- package/dist/synthesis/SapiTTS.js +2 -2
- package/dist/synthesis/SapiTTS.js.map +1 -1
- package/dist/synthesis/SvoxPicoTTS.d.ts +2 -2
- package/dist/synthesis/SvoxPicoTTS.d.ts.map +1 -1
- package/dist/synthesis/SvoxPicoTTS.js +3 -3
- package/dist/synthesis/SvoxPicoTTS.js.map +1 -1
- package/dist/synthesis/VitsTTS.d.ts +3 -3
- package/dist/synthesis/VitsTTS.d.ts.map +1 -1
- package/dist/synthesis/VitsTTS.js +14 -11
- package/dist/synthesis/VitsTTS.js.map +1 -1
- package/dist/text-translation/DeepLTextTranslation.d.ts +2 -2
- package/dist/text-translation/DeepLTextTranslation.d.ts.map +1 -1
- package/dist/text-translation/DeepLTextTranslation.js +10 -9
- package/dist/text-translation/DeepLTextTranslation.js.map +1 -1
- package/dist/text-translation/GoogleTranslateTextTranslation.d.ts +4 -4
- package/dist/text-translation/GoogleTranslateTextTranslation.d.ts.map +1 -1
- package/dist/text-translation/GoogleTranslateTextTranslation.js +20 -18
- package/dist/text-translation/GoogleTranslateTextTranslation.js.map +1 -1
- package/dist/text-translation/NLLBTextTranslation.d.ts +2 -2
- package/dist/text-translation/NLLBTextTranslation.d.ts.map +1 -1
- package/dist/text-translation/NLLBTextTranslation.js +4 -6
- package/dist/text-translation/NLLBTextTranslation.js.map +1 -1
- package/dist/typings/TypedArray.d.ts.map +1 -1
- package/dist/utilities/Compression.d.ts +4 -3
- package/dist/utilities/Compression.d.ts.map +1 -1
- package/dist/utilities/Compression.js +9 -9
- package/dist/utilities/Compression.js.map +1 -1
- package/dist/utilities/FileDownloader.d.ts +6 -3
- package/dist/utilities/FileDownloader.d.ts.map +1 -1
- package/dist/utilities/FileDownloader.js +25 -21
- package/dist/utilities/FileDownloader.js.map +1 -1
- package/dist/utilities/FileReader.d.ts.map +1 -1
- package/dist/utilities/FileReader.js.map +1 -1
- package/dist/utilities/FileSystem.js +1 -1
- package/dist/utilities/FileSystem.js.map +1 -1
- package/dist/utilities/FileWriter.d.ts.map +1 -1
- package/dist/utilities/FileWriter.js.map +1 -1
- package/dist/utilities/Hashing.d.ts.map +1 -1
- package/dist/utilities/Hashing.js.map +1 -1
- package/dist/utilities/Locale.js.map +1 -1
- package/dist/utilities/Logger.d.ts +17 -9
- package/dist/utilities/Logger.d.ts.map +1 -1
- package/dist/utilities/Logger.js +50 -35
- package/dist/utilities/Logger.js.map +1 -1
- package/dist/utilities/NpmUtilities.d.ts.map +1 -1
- package/dist/utilities/NpmUtilities.js +4 -5
- package/dist/utilities/NpmUtilities.js.map +1 -1
- package/dist/utilities/ObjectUtilities.js.map +1 -1
- package/dist/utilities/OpenPromise.d.ts.map +1 -1
- package/dist/utilities/OpenPromise.js.map +1 -1
- package/dist/utilities/PackageManager.d.ts +4 -1
- package/dist/utilities/PackageManager.d.ts.map +1 -1
- package/dist/utilities/PackageManager.js +37 -22
- package/dist/utilities/PackageManager.js.map +1 -1
- package/dist/utilities/PathUtilities.d.ts +2 -0
- package/dist/utilities/PathUtilities.d.ts.map +1 -1
- package/dist/utilities/PathUtilities.js +5 -2
- package/dist/utilities/PathUtilities.js.map +1 -1
- package/dist/utilities/RandomGenerator.d.ts.map +1 -1
- package/dist/utilities/SignalChannel.d.ts.map +1 -1
- package/dist/utilities/SmoothEstimator.d.ts.map +1 -1
- package/dist/utilities/SmoothEstimator.js.map +1 -1
- package/dist/utilities/StringBuilder.d.ts.map +1 -1
- package/dist/utilities/TarballMaker.d.ts +4 -3
- package/dist/utilities/TarballMaker.d.ts.map +1 -1
- package/dist/utilities/TarballMaker.js +6 -6
- package/dist/utilities/TarballMaker.js.map +1 -1
- package/dist/utilities/Timeline.js.map +1 -1
- package/dist/utilities/Timer.d.ts.map +1 -1
- package/dist/utilities/Utilities.d.ts +9 -7
- package/dist/utilities/Utilities.d.ts.map +1 -1
- package/dist/utilities/Utilities.js +49 -33
- package/dist/utilities/Utilities.js.map +1 -1
- package/dist/utilities/VirtualFileReadStream.d.ts.map +1 -1
- package/dist/utilities/WebReader.d.ts +2 -1
- package/dist/utilities/WebReader.d.ts.map +1 -1
- package/dist/utilities/WebReader.js +7 -6
- package/dist/utilities/WebReader.js.map +1 -1
- package/dist/utilities/WikipediaReader.d.ts +2 -1
- package/dist/utilities/WikipediaReader.d.ts.map +1 -1
- package/dist/utilities/WikipediaReader.js +1 -5
- package/dist/utilities/WikipediaReader.js.map +1 -1
- package/dist/voice-activity-detection/AdaptiveGateVAD.d.ts +2 -1
- package/dist/voice-activity-detection/AdaptiveGateVAD.d.ts.map +1 -1
- package/dist/voice-activity-detection/AdaptiveGateVAD.js +1 -1
- package/dist/voice-activity-detection/AdaptiveGateVAD.js.map +1 -1
- package/dist/voice-activity-detection/SileroVAD.d.ts.map +1 -1
- package/dist/voice-activity-detection/SileroVAD.js.map +1 -1
- package/dist/voice-activity-detection/WebRtcVAD.d.ts.map +1 -1
- package/dist/voice-activity-detection/WebRtcVAD.js +1 -1
- package/dist/voice-activity-detection/WebRtcVAD.js.map +1 -1
- package/docs/API.md +62 -17
- package/docs/CUDA.md +4 -3
- package/docs/Engines.md +8 -7
- package/docs/Licenses.md +0 -3
- package/docs/Options.md +27 -31
- package/docs/Server.md +1 -0
- package/docs/Tasklist.md +2 -1
- package/docs/Technical.md +2 -2
- package/package.json +45 -35
- package/src/alignment/SemanticTextAlignment.ts +14 -7
- package/src/alignment/SpeechAlignment.ts +47 -150
- package/src/api/APIOptions.ts +1 -1
- package/src/api/Alignment.ts +95 -61
- package/src/api/Common.ts +11 -0
- package/src/api/Denoising.ts +22 -17
- package/src/api/GlobalOptions.ts +4 -20
- package/src/api/Recognition.ts +106 -123
- package/src/api/SourceSeparation.ts +39 -21
- package/src/api/SpeechLanguageDetection.ts +77 -37
- package/src/api/SpeechSearch.ts +6 -1
- package/src/api/SpeechTranslation.ts +75 -38
- package/src/api/Synthesis.ts +220 -116
- package/src/api/TextLanguageDetection.ts +10 -12
- package/src/api/TextTranslation.ts +43 -26
- package/src/api/TimelineTranslationAlignment.ts +41 -13
- package/src/api/TranscriptAndTranslationAlignment.ts +28 -15
- package/src/api/TranslationAlignment.ts +53 -24
- package/src/api/VoiceActivityDetection.ts +33 -68
- package/src/audio/AudioPlayer.ts +4 -232
- package/src/audio/AudioUtilities.ts +9 -2
- package/src/build-tools/MakeTarballsForInstalledPackages.ts +4 -3
- package/src/cli/CLI.ts +209 -101
- package/src/codecs/FFMpegTranscoder.ts +18 -16
- package/src/denoising/NSNet2.ts +5 -4
- package/src/denoising/RNNoise.ts +14 -6
- package/src/dsp/FFT.ts +2 -1
- package/src/dsp/MFCC.ts +7 -5
- package/src/dsp/MelSpectrogram.ts +56 -36
- package/src/dsp/Rubberband.ts +10 -3
- package/src/dsp/Sonic.ts +2 -1
- package/src/dsp/SpeexResampler.ts +2 -1
- package/src/encodings/Ascii.ts +1 -1
- package/src/encodings/Base64.ts +1 -1
- package/src/math/VectorMath.ts +10 -6
- package/src/nlp/EspeakPhonemizer.ts +2 -2
- package/src/nlp/Segmentation.ts +9 -4
- package/src/recognition/AmazonTranscribeSTT.ts +4 -3
- package/src/recognition/AzureCognitiveServicesSTT.ts +5 -4
- package/src/recognition/DeepgramSTT.ts +16 -16
- package/src/recognition/GoogleCloudSTT.ts +14 -12
- package/src/recognition/OpenAICloudSTT.ts +12 -6
- package/src/recognition/WhisperCommon.ts +130 -0
- package/src/recognition/{WhisperCppSTT.ts → WhisperCppCliSTT.ts} +73 -133
- package/src/recognition/WhisperSTT.ts +569 -718
- package/src/server/Client.ts +4 -4
- package/src/server/Worker.ts +59 -59
- package/src/source-separation/MDXNetSourceSeparation.ts +15 -10
- package/src/speech-embeddings/WavToVec2BertFeatureEmbeddings.ts +7 -5
- package/src/speech-language-detection/SileroLanguageDetection.ts +18 -9
- package/src/speech-search/DTWSpeechSearch.ts +6 -5
- package/src/subtitles/Subtitles.ts +22 -22
- package/src/synthesis/AwsPollyTTS.ts +12 -5
- package/src/synthesis/AzureCognitiveServicesTTS.ts +11 -3
- package/src/synthesis/CoquiServerTTS.ts +8 -7
- package/src/synthesis/DeepgramTTS.ts +21 -15
- package/src/synthesis/ElevenLabsTTS.ts +33 -23
- package/src/synthesis/EspeakTTS.ts +145 -69
- package/src/synthesis/FliteTTS.ts +3 -3
- package/src/synthesis/GnuSpeechTTS.ts +2 -2
- package/src/synthesis/GoogleCloudTTS.ts +23 -14
- package/src/synthesis/GoogleTranslateTTS.ts +19 -11
- package/src/synthesis/KokoroTTS.ts +37 -14
- package/src/synthesis/MicrosoftEdgeTTS.ts +71 -23
- package/src/synthesis/OpenAICloudTTS.ts +7 -6
- package/src/synthesis/SamTTS.ts +3 -2
- package/src/synthesis/SapiTTS.ts +3 -3
- package/src/synthesis/SvoxPicoTTS.ts +4 -5
- package/src/synthesis/VitsTTS.ts +43 -15
- package/src/text-translation/DeepLTextTranslation.ts +12 -10
- package/src/text-translation/GoogleTranslateTextTranslation.ts +35 -21
- package/src/text-translation/NLLBTextTranslation.ts +5 -9
- package/src/typings/Fillers.d.ts +0 -60
- package/src/typings/TypedArray.ts +12 -1
- package/src/utilities/Compression.ts +10 -9
- package/src/utilities/FileDownloader.ts +38 -23
- package/src/utilities/FileSystem.ts +1 -1
- package/src/utilities/Logger.ts +59 -42
- package/src/utilities/NpmUtilities.ts +4 -6
- package/src/utilities/OpenPromise.ts +1 -2
- package/src/utilities/PackageManager.ts +53 -26
- package/src/utilities/PathUtilities.ts +6 -2
- package/src/utilities/TarballMaker.ts +7 -7
- package/src/utilities/Utilities.ts +58 -41
- package/src/utilities/WebReader.ts +11 -6
- package/src/utilities/WikipediaReader.ts +2 -8
- package/src/voice-activity-detection/AdaptiveGateVAD.ts +13 -8
- package/src/voice-activity-detection/WebRtcVAD.ts +1 -2
- package/tsconfig.json +53 -54
- package/dist/audio/AudioRecorder.d.ts +0 -4
- package/dist/audio/AudioRecorder.d.ts.map +0 -1
- package/dist/audio/AudioRecorder.js +0 -68
- package/dist/audio/AudioRecorder.js.map +0 -1
- package/dist/audio/SoxPath.d.ts +0 -2
- package/dist/audio/SoxPath.d.ts.map +0 -1
- package/dist/audio/SoxPath.js +0 -24
- package/dist/audio/SoxPath.js.map +0 -1
- package/dist/recognition/SileroSTT.d.ts +0 -30
- package/dist/recognition/SileroSTT.d.ts.map +0 -1
- package/dist/recognition/SileroSTT.js +0 -152
- package/dist/recognition/SileroSTT.js.map +0 -1
- package/dist/recognition/VoskSTT.d.ts +0 -11
- package/dist/recognition/VoskSTT.d.ts.map +0 -1
- package/dist/recognition/VoskSTT.js +0 -72
- package/dist/recognition/VoskSTT.js.map +0 -1
- package/dist/recognition/WhisperCppSTT.d.ts.map +0 -1
- package/dist/recognition/WhisperCppSTT.js.map +0 -1
- package/dist/synthesis/StreamlabsPollyTTS.d.ts +0 -12
- package/dist/synthesis/StreamlabsPollyTTS.d.ts.map +0 -1
- package/dist/synthesis/StreamlabsPollyTTS.js +0 -88
- package/dist/synthesis/StreamlabsPollyTTS.js.map +0 -1
- package/dist/utilities/BinaryUtilities.d.ts +0 -14
- package/dist/utilities/BinaryUtilities.d.ts.map +0 -1
- package/dist/utilities/BinaryUtilities.js +0 -113
- package/dist/utilities/BinaryUtilities.js.map +0 -1
- package/src/audio/AudioRecorder.ts +0 -91
- package/src/audio/SoxPath.ts +0 -31
- package/src/recognition/SileroSTT.ts +0 -222
- package/src/recognition/VoskSTT.ts +0 -112
- package/src/synthesis/StreamlabsPollyTTS.ts +0 -114
- package/src/utilities/BinaryUtilities.ts +0 -138
- /package/{LICENSE.md → LICENSE.GPLv3.md} +0 -0
package/docs/Engines.md
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
**Offline, Windows only**:
|
|
17
17
|
|
|
18
18
|
* [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)
|
|
19
|
-
|
|
20
19
|
* [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
|
|
21
20
|
|
|
22
21
|
**Note**: both these engines require manually installing the [`winax` npm package](https://www.npmjs.com/package/winax) by running `npm install winax -g`.
|
|
@@ -44,15 +43,13 @@ These cloud-based engines connect to public cloud APIs that are not officially p
|
|
|
44
43
|
|
|
45
44
|
* 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)
|
|
46
45
|
* 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
|
|
47
|
-
* 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 (**Note**: as of April 2024, the public Streamlabs Polly REST API doesn't seem to be accessible anymore)
|
|
48
46
|
|
|
49
47
|
## Speech-to-text
|
|
50
48
|
|
|
51
49
|
**Offline**:
|
|
52
|
-
|
|
53
|
-
* [Whisper
|
|
54
|
-
* [
|
|
55
|
-
* [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)
|
|
50
|
+
|
|
51
|
+
* [OpenAI Whisper](https://github.com/openai/whisper) (`whisper`): high-accuracy transformer-based speech recognition architecture. TypeScript implementation. Since `v3.0.0`, it internally uses a minimal NAPI binding to a small set of `whisper.cpp` operations via its C API (before `v3.0.0` it used a much slower ONNX-based implementation)
|
|
52
|
+
* [Whisper.cpp](https://github.com/ggerganov/whisper.cpp) (`whisper.cpp`): uses the CLI (command line interface) of `whisper.cpp`, a C++ port of the Whisper architecture by Georgi Gerganov
|
|
56
53
|
|
|
57
54
|
**Cloud services**:
|
|
58
55
|
|
|
@@ -75,10 +72,12 @@ These engines' goal is to match (or "align") a given spoken recording with a giv
|
|
|
75
72
|
## Speech-to-text translation
|
|
76
73
|
|
|
77
74
|
**Offline**:
|
|
75
|
+
|
|
78
76
|
* [Whisper](https://github.com/openai/whisper) (`whisper`): the Whisper model can recognize speech in any one of its supported languages and output a transcript directly translated to English. Other languages are not supported as targets
|
|
79
|
-
* [Whisper.cpp](https://github.com/ggerganov/whisper.cpp) (`whisper.cpp`):
|
|
77
|
+
* [Whisper.cpp](https://github.com/ggerganov/whisper.cpp) (`whisper.cpp`): uses `whisper.cpp` CLI. Supports translation to English only
|
|
80
78
|
|
|
81
79
|
**Cloud services**:
|
|
80
|
+
|
|
82
81
|
* [OpenAI Cloud Platform](https://platform.openai.com/) (`openai-cloud`): runs the `large-v2` Whisper model on the cloud. Only supports English as target
|
|
83
82
|
|
|
84
83
|
## Text-to-text translation
|
|
@@ -121,10 +120,12 @@ Another use case it to take a timeline produced as part of synthesized or recogn
|
|
|
121
120
|
## Language detection
|
|
122
121
|
|
|
123
122
|
**Spoken language detection**:
|
|
123
|
+
|
|
124
124
|
* [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 [98 languages](https://platform.openai.com/docs/guides/speech-to-text/supported-languages) it has been trained on
|
|
125
125
|
* [Silero Language Classifier](https://github.com/snakers4/silero-vad/wiki/Other-Models) (`silero`): a speech language classification model by Silero
|
|
126
126
|
|
|
127
127
|
**Text language detection**:
|
|
128
|
+
|
|
128
129
|
* [TinyLD](https://www.npmjs.com/package/tinyld) (`tinyld`): a simple language detection library
|
|
129
130
|
* [FastText](https://github.com/facebookresearch/fastText) (`fasttext`): a library for word representations and sentence classification by Facebook research
|
|
130
131
|
|
package/docs/Licenses.md
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* `pico`: [Apache License 2.0](https://github.com/gmn/nanotts/blob/master/LICENSE)
|
|
9
9
|
* `gnuspeech`: [GNU GPL v3](https://github.com/mym-br/gnuspeech_sa/blob/master/COPYING.txt)
|
|
10
10
|
* `sam`: [Abandonware / fair-use / unknown](https://github.com/discordier/sam#license)
|
|
11
|
-
* `vosk` [Apache License 2.0](https://github.com/alphacep/vosk-api/blob/master/COPYING)
|
|
12
11
|
* `tinyld` [MIT License](https://github.com/komodojp/tinyld/blob/develop/license)
|
|
13
12
|
* `fasttext`: [MIT License](https://github.com/loretoparisi/fasttext.js/blob/master/LICENSE)
|
|
14
13
|
* `fvad` [BSD-3-Clause](https://github.com/cpuimage/WebRTC_VAD/blob/master/LICENSE)
|
|
@@ -31,7 +30,6 @@ All are freely distributable, with varying licenses:
|
|
|
31
30
|
* Flite voices (`flite-`): [BSD License](https://github.com/festvox/flite/blob/master/COPYING)
|
|
32
31
|
* SVOX Pico resources (`pico-`): [Apache License 2.0](https://github.com/gmn/nanotts/blob/master/LICENSE)
|
|
33
32
|
* Silero VAD (`silero-vad`) and Silero language classifier (`silero-lang-classifier-95`): [MIT License](https://github.com/snakers4/silero-vad/blob/master/LICENSE)
|
|
34
|
-
* Silero speech recognition models (`silero-en-`, `silero-de-`, `silero-es-`, `silero-ua-`): [BY-NC-SA](https://github.com/snakers4/silero-models/blob/master/LICENSE)
|
|
35
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 [Piper samples page](https://rhasspy.github.io/piper-samples/)
|
|
36
34
|
* Whisper pre-trained models (`whisper-`): [MIT License](https://github.com/openai/whisper/blob/main/LICENSE)
|
|
37
35
|
* MDX-NET source separation models (`mdxnet-`): [MIT License](https://github.com/kuielab/mdx-net/blob/main/LICENSE)
|
|
@@ -39,5 +37,4 @@ All are freely distributable, with varying licenses:
|
|
|
39
37
|
|
|
40
38
|
Tool binary distributions
|
|
41
39
|
* FFmpeg: [LGPL, GPL v2 and GPL v3 Licenses](https://github.com/FFmpeg/FFmpeg)
|
|
42
|
-
* SoX: [GPL v2 License](https://github.com/chirlu/sox/blob/master/LICENSE.GPL)
|
|
43
40
|
* whisper.cpp: [MIT License](https://github.com/ggerganov/whisper.cpp/blob/master/LICENSE)
|
package/docs/Options.md
CHANGED
|
@@ -12,7 +12,7 @@ Here's a detailed reference for all the options accepted by the Echogarden CLI a
|
|
|
12
12
|
Applies to CLI operations: `speak`, `speak-file`, `speak-url`, `speak-wikipedia`, API method: `synthesize`
|
|
13
13
|
|
|
14
14
|
**General**:
|
|
15
|
-
* `engine`: identifier of the synthesis engine to use. Can be `kokoro`, `vits`, `pico`, `flite`, `gnuspeech`, `espeak`, `sam`, `sapi`, `msspeech`, `coqui-server`, `google-cloud`, `microsoft-azure`, `amazon-polly`, `openai-cloud`, `elevenlabs`, `google-translate
|
|
15
|
+
* `engine`: identifier of the synthesis engine to use. Can be `kokoro`, `vits`, `pico`, `flite`, `gnuspeech`, `espeak`, `sam`, `sapi`, `msspeech`, `coqui-server`, `google-cloud`, `microsoft-azure`, `amazon-polly`, `openai-cloud`, `elevenlabs`, `google-translate` or `microsoft-edge` (see [the engines documentation page](Engines.md) for more detailed information about each engine). Auto-selected if not set
|
|
16
16
|
* `language`: language code, can be ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)), like `en`, `fr`, `en-US`, `pt-BR`, etc. [ISO 639-3](https://en.wikipedia.org/wiki/ISO_639-3), or a plain language name like `french`. Auto-detected if not set
|
|
17
17
|
* `voice`: name of the voice to use. Can be a search string. Auto-selected if not set
|
|
18
18
|
* `voiceGender`: gender of the voice to use. Optional
|
|
@@ -146,7 +146,7 @@ Also accepted are the following engine-specific options that may be required in
|
|
|
146
146
|
Applies to CLI operation: `transcribe`, API method: `recognize`
|
|
147
147
|
|
|
148
148
|
**General**:
|
|
149
|
-
* `engine`: identifier of the recognition engine to use, can be `whisper`, `whisper.cpp`, `
|
|
149
|
+
* `engine`: identifier of the recognition engine to use, can be `whisper`, `whisper.cpp`, `google-cloud`, `microsoft-azure`, `amazon-transcribe`, `openai-cloud`, `deepgram` (see [the full engine list](Engines.md) for more detailed information)
|
|
150
150
|
* `language`: language code ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)) for the audio, like `en`, `fr`, `de`. Auto-detected if not set
|
|
151
151
|
* `crop`: crop to active parts using voice activity detection before starting recognition. Defaults to `true`
|
|
152
152
|
* `isolate`: apply source separation to isolate voice before starting recognition. Defaults to `false`
|
|
@@ -157,7 +157,10 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
|
|
|
157
157
|
* `sourceSeparation`: prefix to provide options for source separation when `isolate` is set to `true`. Options detailed in section for source separation
|
|
158
158
|
|
|
159
159
|
**Whisper**:
|
|
160
|
-
* `whisper.model`: selects which Whisper model to use. Can be `tiny`, `tiny.en`, `base`, `base.en`, `small`, `small.en`, `medium`, `medium.en`
|
|
160
|
+
* `whisper.model`: selects which Whisper model to use. Can be `tiny`, `tiny.en`, `base`, `base.en`, `small`, `small.en`, `medium`, `medium.en`, `large` (same as `large-v2`), `large-v1`, `large-v2`, `large-v3`, `large-v3-turbo`. The following quantized models are also supported: `tiny-q5_1`,`tiny-q8_0`, `tiny.en-q5_1`, `tiny.en-q8_0`,`base-q5_1`, `base-q8_0`, `base.en-q5_1`, `base.en-q8_0`,`small-q5_1`, `small.en-q5_1`, `small.en-q8_0`,`medium-q5_0`, `medium.en-q5_0`, `medium.en-q8_0`, `large-v2-q5_0`, `large-v2-q8_0`, `large-v3-q5_0`, `large-v3-turbo-q5_0`, `large-v3-turbo-q8_0`. Defaults to `base` or `base.en` for English
|
|
161
|
+
* `whisper.enableGPU`: enable GPU processing. Setting to `true` will try to use a CUDA build, if available for your architecture (currently CUDA 12.4 builds are available for Windows x64 and Linux x64).
|
|
162
|
+
* `whisper.threadCount`: number of threads to use, defaults to `4`
|
|
163
|
+
* `whisper.gpuDeviceIndex`: GPU device index (if GPU is enabled), defaults to `0`
|
|
161
164
|
* `whisper.temperature`: temperature setting for the text decoder. Impacts the amount of randomization for token selection. It is recommended to leave at `0.1` (close to no randomization - almost always chooses the top ranked token) or choose a relatively low value (`0.25` or lower) for best results. Defaults to `0.1`
|
|
162
165
|
* `whisper.prompt`: initial text to give the Whisper model. Can be a vocabulary, or example text of some sort. Note that if the prompt is very similar to the transcript, the model may intentionally avoid producing the transcript tokens as it may assume that they have already been transcribed. Optional
|
|
163
166
|
* `whisper.topCandidateCount`: the number of top candidate tokens to consider. Defaults to `5`
|
|
@@ -168,17 +171,15 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
|
|
|
168
171
|
* `whisper.repetitionThreshold`: minimal repetition / compressibility score to cause a part not to be auto-prompted to the next part. Defaults to `2.4`
|
|
169
172
|
* `whisper.decodeTimestampTokens`: enable/disable decoding of timestamp tokens. Setting to `false` can reduce the occurrence of hallucinations and token repetition loops, possibly due to the overall reduction in the number of tokens decoded. This has no impact on the accuracy of timestamps, since they are derived independently using cross-attention weights. However, there are cases where this can cause the model to end a part prematurely, especially in singing and less speech-like voice segments, or when there are multiple speakers. Defaults to `true`
|
|
170
173
|
* `whisper.timestampAccuracy`: timestamp accuracy. can be `medium` or `high`. `medium` uses a reduced subset of attention heads for alignment, `high` uses all attention heads and is thus more accurate at the word level, but slower for larger models. Defaults to `high` for the `tiny` and `base` models, and `medium` for the larger models
|
|
171
|
-
* `whisper.encoderProvider`: identifier for the ONNX execution provider to use with the encoder model. Can be `cpu`, `dml` (Windows only, uses [DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration), or `cuda` (Linux only, requires system-wide installation of CUDA and cuDNN SDKs, see [this guide](./CUDA.md) for more detailed information). In general, GPU-based encoding should be significantly faster. Defaults to `cpu`, or `dml` if available
|
|
172
|
-
* `whisper.decoderProvider`: identifier for the ONNX execution provider to use with the decoder model. Can be `cpu`, `dml` (Windows only, uses [DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration), or `cuda` (Linux only, requires system-wide installation of CUDA and cuDNN SDKs, see [this guide](./CUDA.md) for more detailed information).. Using GPU acceleration for the decoder may be faster than CPU, especially for larger models, but that depends on your particular combination of CPU and GPU. Defaults to `cpu`, and on Windows, `dml` if available, for larger models (`small`, `medium`, `large`)
|
|
173
174
|
* `whisper.seed`: provide a custom random seed for token selection when temperature is greater than 0. Uses a constant seed by default to ensure reproducibility
|
|
174
175
|
|
|
175
|
-
**Whisper.cpp**:
|
|
176
|
-
* `whisperCpp.model`: selects which `whisper.cpp` model to use.
|
|
176
|
+
**Whisper.cpp CLI**:
|
|
177
|
+
* `whisperCpp.model`: selects which `whisper.cpp` model to use. Model identifiers and defaults are identical to those in the `whisper` engine
|
|
177
178
|
* `whisperCpp.executablePath`: a path to a custom `whisper.cpp` `whisper-cli` executable (currently required for macOS)
|
|
178
179
|
* `whisperCpp.build`: type of `whisper.cpp` build to use. Can be set to `cpu`, `cublas-12.4.0` or `custom`. By default, builds are auto-selected and downloaded for Windows x64 and Linux x64 (for both `cpu` and `cublas-12.4.0`). The Linux CUDA build requires a [system-wide installation of CUDA Toolkit 12.4+](https://developer.nvidia.com/cuda-downloads), available on path. Using other builds requires providing a custom `executablePath`, which will automatically set this option to `custom`
|
|
180
|
+
* `whisperCpp.enableGPU`: enable GPU processing. Setting to `true` will try to use a CUDA build, if available for your system. Defaults to `true` when a CUDA-enabled build is selected via `whisperCpp.build`, otherwise `false`. If a custom build is used, it will enable or disable GPU for that build
|
|
179
181
|
* `whisperCpp.threadCount`: number of threads to use, defaults to `4`
|
|
180
182
|
* `whisperCpp.splitCount`: number of splits of the audio data to process in parallel (called `--processors` in the `whisper.cpp` CLI). A value greater than `1` can increase memory use significantly, reduce timing accuracy, and slow down execution in some cases. Defaults to `1` (highly recommended)
|
|
181
|
-
* `whisperCpp.enableGPU`: enable GPU processing. Setting to `true` will try to use a CUDA build, if available for your system. Defaults to `true` when a CUDA-enabled build is selected via `whisperCpp.build`, otherwise `false`. If a custom build is used, it will enable or disable GPU for that build
|
|
182
183
|
* `whisperCpp.topCandidateCount`: the number of top candidate tokens to consider. Defaults to `5`
|
|
183
184
|
* `whisperCpp.beamCount`: the number of decoding paths to use during beam search. Defaults to `5`
|
|
184
185
|
* `whisperCpp.temperature`: set temperature. Defaults to `0.0`
|
|
@@ -189,13 +190,6 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
|
|
|
189
190
|
* `whisperCpp.enableFlashAttention`: enable flash attention. Can significantly increase performance for some configurations (**Note**: setting this to `true` will cause `enableDTW` to always be set to `false` since it's not compatible with flash attention). Defaults to `false`
|
|
190
191
|
* `whisperCpp.verbose`: show all CLI messages during execution. Defaults to `false`
|
|
191
192
|
|
|
192
|
-
**Vosk**:
|
|
193
|
-
* `vosk.modelPath`: path to the Vosk model to be used
|
|
194
|
-
|
|
195
|
-
**Silero**:
|
|
196
|
-
* `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
|
|
197
|
-
* `silero.provider`: ONNX execution provider to use. Can be `cpu`, `dml` (Windows only, uses [DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration), or `cuda` (Linux only, requires system-wide installation of CUDA and cuDNN SDKs, see [this guide](./CUDA.md) for more detailed information). Defaults to `cpu`, or `dml` if available
|
|
198
|
-
|
|
199
193
|
**Google Cloud**:
|
|
200
194
|
* `googleCloud.apiKey`: Google Cloud API key (required)
|
|
201
195
|
* `googleCloud.alternativeLanguageCodes`: An array of alternative language codes. Optional
|
|
@@ -258,19 +252,20 @@ Applies to CLI operation: `align`, API method: `align`
|
|
|
258
252
|
|
|
259
253
|
Applies to the `whisper` engine only. To provide Whisper options for `dtw-ra`, use `recognition.whisper` instead.
|
|
260
254
|
|
|
261
|
-
* `whisper.model`: Whisper model to use. Defaults to `
|
|
255
|
+
* `whisper.model`: Whisper model to use. Defaults to `base` or `base.en`
|
|
256
|
+
* `whisper.enableGPU`: enable whisper GPU build. See details in recognition section above
|
|
257
|
+
* `whisper.threadCount`: number of threads to use, defaults to `4`
|
|
258
|
+
* `whisper.gpuDeviceIndex`: GPU device index (if GPU is enabled), defaults to `0`
|
|
262
259
|
* `whisper.endTokenThreshold`: minimal probability to accept an end token for a recognized part. The probability is measured via the softmax between the end token's logit and the second highest logit. You can try to adjust this threshold in cases the model is ending a part with too few, or many tokens decoded. Defaults to `0.9`. On the last audio part, it is always effectively set to `Infinity`, to ensure the remaining transcript tokens are decoded in full
|
|
263
260
|
* `whisper.maxTokensPerPart`: maximum number of tokens to decode per part. Should help avoid edge cases where the model never reaches an end token for the part, which otherwise may cause the model to decode too many tokens and eventually crash. Defaults to `220` (highest possible)
|
|
264
261
|
* `whisper.timestampAccuracy`: timestamp accuracy. can be `medium` or `high`. `medium` uses a reduced subset of attention heads for alignment, `high` uses all attention heads and is thus more accurate at the word level, but slower for larger models. Defaults to `high` for the `tiny` and `base` models, and `medium` for the larger models. Note: setting `high` for model `large-v3-turbo` reverts to `medium`, due to poor results with the `high` setting for that model (possibly related to the 16-bit quantization).
|
|
265
|
-
* `whisper.encoderProvider`: encoder ONNX provider. See details in recognition section above
|
|
266
|
-
* `whisper.decoderProvider`: decoder ONNX provider. See details in recognition section above
|
|
267
262
|
|
|
268
263
|
## Speech-to-text translation
|
|
269
264
|
|
|
270
265
|
Applies to CLI operation: `translate-speech`, API method: `translateSpeech`
|
|
271
266
|
|
|
272
267
|
**General**:
|
|
273
|
-
* `engine`:
|
|
268
|
+
* `engine`: Can be `whisper`, `whisper.cpp` or `openai-cloud`. Defaults to `whisper`
|
|
274
269
|
* `sourceLanguage`: the source language code for the input speech. Auto-detected if not set
|
|
275
270
|
* `targetLanguage`: the target language code for the output speech. Only `en` (English) supported by the `whisper` engine. Optional
|
|
276
271
|
* `crop`: crop to active parts using voice activity detection before starting. Defaults to `true`
|
|
@@ -283,9 +278,9 @@ Applies to CLI operation: `translate-speech`, API method: `translateSpeech`
|
|
|
283
278
|
|
|
284
279
|
* `whisper`: prefix to provide options for the Whisper model. Same options as detailed in the recognition section above
|
|
285
280
|
|
|
286
|
-
**Whisper.cpp**:
|
|
281
|
+
**Whisper.cpp CLI**:
|
|
287
282
|
|
|
288
|
-
* `
|
|
283
|
+
* `whisperCpp`: prefix to provide options for the Whisper.cpp model. Same options as detailed in the recognition section above
|
|
289
284
|
|
|
290
285
|
**OpenAI Cloud**:
|
|
291
286
|
|
|
@@ -321,10 +316,11 @@ Applies to CLI operation: `align-translation`, API method: `alignTranslation`
|
|
|
321
316
|
* `sourceSeparation`: prefix to provide options for source separation when `isolate` is set to `true`. Options detailed in section for source separation
|
|
322
317
|
|
|
323
318
|
**Whisper**:
|
|
324
|
-
* `whisper.model`: Whisper model to use. Only multilingual models can be used. Defaults to `
|
|
319
|
+
* `whisper.model`: Whisper model to use. Only multilingual models can be used. Defaults to `base`
|
|
320
|
+
* `whisper.enableGPU`: enable whisper GPU build. See details in recognition section above
|
|
321
|
+
* `whisper.threadCount`: number of threads to use, defaults to `4`
|
|
322
|
+
* `whisper.gpuDeviceIndex`: GPU device index (if GPU is enabled), defaults to `0`
|
|
325
323
|
* `whisper.endTokenThreshold`: see details in the alignment section above
|
|
326
|
-
* `whisper.encoderProvider`: encoder ONNX execution provider. See details in recognition section above
|
|
327
|
-
* `whisper.decoderProvider`: decoder ONNX execution provider. See details in recognition section above
|
|
328
324
|
|
|
329
325
|
## Speech-to-transcript-and-translation alignment
|
|
330
326
|
|
|
@@ -371,10 +367,11 @@ Applies to CLI operation: `detect-speech-langauge`, API method: `detectSpeechLan
|
|
|
371
367
|
* `vad`: prefix to provide options for voice activity detection when `crop` is set to `true`. Options detailed in section for voice activity detection
|
|
372
368
|
|
|
373
369
|
**Whisper**:
|
|
374
|
-
* `whisper.model`: Whisper model to use. See model list in the recognition section
|
|
370
|
+
* `whisper.model`: Whisper model to use. See model list in the recognition section. Defaults to `tiny`
|
|
371
|
+
* `whisper.enableGPU`: enable whisper GPU build. See details in recognition section above
|
|
372
|
+
* `whisper.threadCount`: number of threads to use, defaults to `4`
|
|
373
|
+
* `whisper.gpuDeviceIndex`: GPU device index (if GPU is enabled), defaults to `0`
|
|
375
374
|
* `whisper.temperature`: impacts the distribution of candidate languages when applying the softmax function to compute language probabilities over the model output. Higher temperature causes the distribution to be more uniform, while lower temperature causes it to be more strongly weighted towards the best scoring candidates. Defaults to `1.0`
|
|
376
|
-
* `whisper.encoderProvider`: encoder ONNX execution provider. See details in recognition section above
|
|
377
|
-
* `whisper.decoderProvider`: decoder ONNX execution provider. See details in recognition section above
|
|
378
375
|
|
|
379
376
|
**Silero**:
|
|
380
377
|
* `silero.provider`: ONNX execution provider to use. Can be `cpu`, `dml` (Windows only, uses [DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration), or `cuda` (Linux only, requires system-wide installation of CUDA and cuDNN SDKs, see [this guide](./CUDA.md) for more detailed information). Using GPU may be faster, but the initialization overhead is larger. **Note**: `dml` provider seems to be unstable at the moment for this model. Defaults to `cpu`
|
|
@@ -455,9 +452,8 @@ These are shared between text-to-speech, speech-to-text and alignment operations
|
|
|
455
452
|
On the CLI, global options can be used with any operation. To set global options via the API, use the `setGlobalOption(key, value)` method (see the [API reference](API.md) for more details).
|
|
456
453
|
|
|
457
454
|
* `ffmpegPath`: sets a custom path for the FFmpeg executable
|
|
458
|
-
* `soxPath`: sets a custom path for the SoX executable
|
|
459
455
|
* `packageBaseURL`: sets a custom base URL for the remote package repository used to download missing packages. Default is `https://huggingface.co/echogarden/echogarden-packages/resolve/main/`. If `huggingface.co` isn't accessible in your location, you can set to use a mirror by changing `huggingface.co` to an alternative domain like `hf-mirror.com`
|
|
460
|
-
* `logLevel`: adjusts the
|
|
456
|
+
* `logLevel`: adjusts the default amount of log messages shown during processing. Possible values: `silent`, `output`, `error`, `warning`, `info`, `trace`. Defaults to `info`
|
|
461
457
|
|
|
462
458
|
|
|
463
459
|
## CLI options
|
|
@@ -465,10 +461,10 @@ On the CLI, global options can be used with any operation. To set global options
|
|
|
465
461
|
These options are for the CLI only.
|
|
466
462
|
|
|
467
463
|
* `--play`, `--no-play`: enable/disable audio playback. Defaults to play if there is no output file specified
|
|
468
|
-
* `--player`: audio player to use. Can be `audio-io` (uses the [`audio-io` package](https://github.com/echogarden-project/audio-io) to directly output to native OS audio buffers)
|
|
464
|
+
* `--player`: audio player to use. Can only be `audio-io` (uses the [`audio-io` package](https://github.com/echogarden-project/audio-io) to directly output to native OS audio buffers). Defaults to `audio-io`
|
|
469
465
|
* `--overwrite`, `--no-overwrite`: overwrite/keep existing files. Doesn't overwrite by default
|
|
470
466
|
* `--debug`, `--no-debug`: show/hide the full details of JavaScript errors, if they occur. Disabled by default
|
|
471
|
-
* `--config=...`: path to configuration file to use. Defaults to `echogarden.config` or `echogarden.config.json`, if found at the current directory
|
|
467
|
+
* `--config=...`: path to configuration file to use. Defaults to `echogarden.config` or `echogarden.config.json` or `echogarden.config.json5`, if found at the current directory
|
|
472
468
|
|
|
473
469
|
## Using a configuration file
|
|
474
470
|
|
package/docs/Server.md
CHANGED
package/docs/Tasklist.md
CHANGED
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
* Add SAPI pronunciation to lexicons (you already have the pronunciations for `en_US` and `en_GB`)
|
|
128
128
|
* 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"
|
|
129
129
|
* Option to add POS tags to timeline, if available
|
|
130
|
+
* `≈` symbol as a word character
|
|
130
131
|
|
|
131
132
|
### Synthesis / VITS
|
|
132
133
|
* Consider adding `⦁︎` (when surrounded by whitespace) as phrase separator
|
|
@@ -144,6 +145,7 @@
|
|
|
144
145
|
* Currently, when input is set to be SSML, it is wrapped in a `<speak>` tag. Handle the case where the user made their own SSML document wrapped with a `<speak>` tag as well. Currently, it may send invalid input to Azure
|
|
145
146
|
|
|
146
147
|
### Recognition
|
|
148
|
+
* Add token UTF-8 bytes in token entries on timeline. Some tokens are only a part of a codepoint, so this will allow to know exactly what they contain - the string representation is would be a Unicode error symbol in that case
|
|
147
149
|
* Show alternatives when playing in the CLI. Clear current line and rewrite already printed text for alternatives during the speech recognition process
|
|
148
150
|
|
|
149
151
|
### Recognition / Whisper
|
|
@@ -244,7 +246,6 @@
|
|
|
244
246
|
* Live input / microphone recognition
|
|
245
247
|
* Implement beam search for Whisper decoder
|
|
246
248
|
* Implement beam search for Silero decoder
|
|
247
|
-
* Live Vosk alternatives events
|
|
248
249
|
* Investigate exporting Whisper models to 16-bit quantized ONNX or a mix of 16-bit and 32-bit
|
|
249
250
|
|
|
250
251
|
### Alignment
|
package/docs/Technical.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
* Echogarden is written in TypeScript and targets the Node.js platform.
|
|
4
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 invoke a command line `ffmpeg` tool, auto-downloaded using its internal package system.
|
|
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 invoke a command line `ffmpeg` tool, auto-downloaded using its internal package system. Since `v3.0.0` it uses a native NAPI binding to `whisper.cpp` in the `whisper` engine
|
|
6
6
|
* It does not depend on essential native node.js modules requiring install-time compilation with `node-gyp`. This greatly simplifies the installation experience for end-users (the ONNX runtime bundles precompiled NAPI modules for all supported platforms - it doesn't require any compilation during its installation).
|
|
7
7
|
|
|
8
8
|
## Package system
|
|
@@ -12,6 +12,7 @@ Echogarden uses its own package system to download and install various component
|
|
|
12
12
|
Packages are downloaded as `.tar.gz` files, and are extracted to `[data-folder]/packages/[package-id-string]`. Each package has its own subdirectory.
|
|
13
13
|
|
|
14
14
|
`[data-folder]` is located at:
|
|
15
|
+
|
|
15
16
|
* `%AppData%\Local\echogarden` on Windows
|
|
16
17
|
* `Users/User/Library/Application Support/echogarden` on macOS
|
|
17
18
|
* `/home/user/.local/share/echogarden` on Linux
|
|
@@ -33,7 +34,6 @@ Currently, the largest contributors to the size are:
|
|
|
33
34
|
|
|
34
35
|
* `onnxruntime-node` (core inference runtime, NAPI): 180MB
|
|
35
36
|
* `kuromoji` (Japanese tokenizer, JavaScript) 40MB
|
|
36
|
-
* `espeak-ng-emscripten` (core synthesis and phonemization engine, WASM): 23MB
|
|
37
37
|
* `tiktoken` (tokenizer library, WASM): 22MB
|
|
38
38
|
* `flite-wasi` (synthesis engine, WASI): 20MB
|
|
39
39
|
* `jieba-wasm` (Chinese tokenizer, WASM): 14MB
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "echogarden",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "An easy-to-use speech toolset. Includes tools for synthesis, recognition, alignment, speech translation, language detection, source separation and more.",
|
|
5
5
|
"author": "Rotem Dan",
|
|
6
|
-
"license": "GPL-3.0",
|
|
6
|
+
"license": "MIT AND GPL-3.0",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"speech",
|
|
9
9
|
"text-to-speech",
|
|
@@ -52,57 +52,59 @@
|
|
|
52
52
|
"echogarden": "./dist/cli/CLILauncher.js"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@aws-sdk/client-polly": "~3.
|
|
56
|
-
"@aws-sdk/client-transcribe-streaming": "~3.
|
|
55
|
+
"@aws-sdk/client-polly": "~3.1095.0",
|
|
56
|
+
"@aws-sdk/client-transcribe-streaming": "~3.1095.0",
|
|
57
57
|
"@echogarden/audio-io": "~0.4.2",
|
|
58
|
-
"@echogarden/espeak-ng-emscripten": "~0.3.5",
|
|
59
58
|
"@echogarden/fasttext-wasm": "~0.1.0",
|
|
60
59
|
"@echogarden/flite-wasi": "~0.1.1",
|
|
61
60
|
"@echogarden/fvad-wasm": "~0.2.0",
|
|
62
|
-
"@echogarden/
|
|
63
|
-
"@echogarden/icu-segmentation-wasm": "~0.2.2",
|
|
61
|
+
"@echogarden/icu-segmentation-wasm": "~0.4.0",
|
|
64
62
|
"@echogarden/pffft-wasm": "~0.4.2",
|
|
65
63
|
"@echogarden/rnnoise-wasm": "~0.2.0",
|
|
66
|
-
"@echogarden/rubberband-wasm": "~0.2.0",
|
|
67
64
|
"@echogarden/sonic-wasm": "~0.2.0",
|
|
68
65
|
"@echogarden/speex-resampler-wasm": "~0.3.0",
|
|
69
66
|
"@echogarden/svoxpico-wasm": "~0.2.0",
|
|
70
|
-
"@echogarden/text-segmentation": "~0.
|
|
67
|
+
"@echogarden/text-segmentation": "~0.7.0",
|
|
71
68
|
"@echogarden/transformers-nodejs-lite": "~2.17.1-lite.4",
|
|
72
|
-
"@echogarden/wave-codec": "~0.
|
|
69
|
+
"@echogarden/wave-codec": "~0.4.0",
|
|
70
|
+
"@echogarden/whisper.cpp-binding": "~0.2.1",
|
|
73
71
|
"@mozilla/readability": "~0.6.0",
|
|
74
|
-
"chalk": "~5.
|
|
72
|
+
"chalk": "~5.6.2",
|
|
75
73
|
"command-exists": "~1.2.9",
|
|
76
|
-
"fs-extra": "~11.
|
|
77
|
-
"gaxios": "~6.7.1",
|
|
74
|
+
"fs-extra": "~11.4.0",
|
|
78
75
|
"graceful-fs": "~4.2.11",
|
|
79
|
-
"html-to-text": "~
|
|
80
|
-
"import-meta-resolve": "~4.
|
|
81
|
-
"jieba-wasm": "~2.
|
|
82
|
-
"jsdom": "~
|
|
83
|
-
"json5": "~2.2.3",
|
|
76
|
+
"html-to-text": "~10.0.0",
|
|
77
|
+
"import-meta-resolve": "~4.2.0",
|
|
78
|
+
"jieba-wasm": "~2.4.0",
|
|
79
|
+
"jsdom": "~29.1.1",
|
|
84
80
|
"kuromoji": "~0.1.2",
|
|
85
|
-
"microsoft-cognitiveservices-speech-sdk": "~1.
|
|
81
|
+
"microsoft-cognitiveservices-speech-sdk": "~1.51.0",
|
|
86
82
|
"msgpack-lite": "~0.1.26",
|
|
87
83
|
"onnxruntime-node": "~1.21.1",
|
|
88
|
-
"openai": "~
|
|
84
|
+
"openai": "~6.49.0",
|
|
85
|
+
"quick-json5": "~0.4.3",
|
|
86
|
+
"easier-http-request": "~0.1.0",
|
|
89
87
|
"regexp-composer": "~0.3.0",
|
|
90
88
|
"sam-js": "~0.3.1",
|
|
91
|
-
"strip-ansi": "~7.
|
|
92
|
-
"tar": "~7.
|
|
93
|
-
"tiktoken": "~1.0.
|
|
89
|
+
"strip-ansi": "~7.2.0",
|
|
90
|
+
"tar": "~7.5.22",
|
|
91
|
+
"tiktoken": "~1.0.22",
|
|
94
92
|
"tinyld": "~1.3.4",
|
|
95
93
|
"wasm-feature-detect": "~1.8.0",
|
|
96
|
-
"wasm-heap-manager": "~0.
|
|
97
|
-
"ws": "~8.
|
|
98
|
-
"wtf_wikipedia": "~10.4.
|
|
94
|
+
"wasm-heap-manager": "~0.4.0",
|
|
95
|
+
"ws": "~8.21.1",
|
|
96
|
+
"wtf_wikipedia": "~10.4.2"
|
|
99
97
|
},
|
|
100
98
|
"peerDependencies": {
|
|
101
|
-
"@echogarden/
|
|
99
|
+
"@echogarden/gnuspeech-wasm": "~0.2.1",
|
|
100
|
+
"@echogarden/rubberband-wasm": "~0.2.0",
|
|
102
101
|
"winax": "~3.4.2"
|
|
103
102
|
},
|
|
104
103
|
"peerDependenciesMeta": {
|
|
105
|
-
"@echogarden/
|
|
104
|
+
"@echogarden/gnuspeech-wasm": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"@echogarden/rubberband-wasm": {
|
|
106
108
|
"optional": true
|
|
107
109
|
},
|
|
108
110
|
"winax": {
|
|
@@ -110,17 +112,25 @@
|
|
|
110
112
|
}
|
|
111
113
|
},
|
|
112
114
|
"devDependencies": {
|
|
115
|
+
"@echogarden/gnuspeech-wasm": "~0.3.0",
|
|
113
116
|
"@types/fs-extra": "~11.0.4",
|
|
114
117
|
"@types/graceful-fs": "~4.1.9",
|
|
115
|
-
"@types/jsdom": "~
|
|
116
|
-
"@types/msgpack-lite": "~0.1.
|
|
117
|
-
"@types/node": "~
|
|
118
|
-
"@types/tar": "~6.1.13",
|
|
118
|
+
"@types/jsdom": "~28.0.3",
|
|
119
|
+
"@types/msgpack-lite": "~0.1.12",
|
|
120
|
+
"@types/node": "~26.1.1",
|
|
119
121
|
"@types/ws": "~8.18.1",
|
|
120
|
-
"ts-json-schema-generator": "~2.
|
|
121
|
-
"typescript": "~
|
|
122
|
+
"ts-json-schema-generator": "~2.9.0",
|
|
123
|
+
"typescript": "~7.0.2"
|
|
122
124
|
},
|
|
123
125
|
"overrides": {
|
|
124
|
-
"whatwg-url": "~14.0.0"
|
|
126
|
+
"whatwg-url": "~14.0.0",
|
|
127
|
+
"adm-zip": "~0.6.0",
|
|
128
|
+
"uuid": "~11.1.1",
|
|
129
|
+
"brace-expansion": "~5.0.8",
|
|
130
|
+
"undici": "~7.28.0"
|
|
131
|
+
},
|
|
132
|
+
"allowScripts": {
|
|
133
|
+
"onnxruntime-node": true,
|
|
134
|
+
"wtf_wikipedia": true
|
|
125
135
|
}
|
|
126
136
|
}
|
|
@@ -5,9 +5,11 @@ import { alignDTWWindowed } from './DTWSequenceAlignmentWindowed.js'
|
|
|
5
5
|
import { cosineDistance } from '../math/VectorMath.js'
|
|
6
6
|
import { includesPunctuation, isWord, parseText } from '../nlp/Segmentation.js'
|
|
7
7
|
import { Timeline, extractEntries } from '../utilities/Timeline.js'
|
|
8
|
+
import { TimelineTranslationAlignmentCallbacks } from '../api/TimelineTranslationAlignment.js'
|
|
9
|
+
import { OperationCallbacks } from '../api/Common.js'
|
|
8
10
|
|
|
9
|
-
export async function alignTimelineToTextSemantically(timeline: Timeline, text: string, textLangCode: string) {
|
|
10
|
-
const logger = new Logger()
|
|
11
|
+
export async function alignTimelineToTextSemantically(timeline: Timeline, text: string, textLangCode: string, callbacks: TimelineTranslationAlignmentCallbacks) {
|
|
12
|
+
const logger = new Logger(callbacks.logLevel)
|
|
11
13
|
|
|
12
14
|
logger.start(`Prepare text for semantic alignment`)
|
|
13
15
|
|
|
@@ -40,7 +42,12 @@ export async function alignTimelineToTextSemantically(timeline: Timeline, text:
|
|
|
40
42
|
|
|
41
43
|
logger.end()
|
|
42
44
|
|
|
43
|
-
const wordMappingEntries = await alignWordsToWordsSemantically(
|
|
45
|
+
const wordMappingEntries = await alignWordsToWordsSemantically(
|
|
46
|
+
timelineWordGroups,
|
|
47
|
+
textWordGroups,
|
|
48
|
+
undefined,
|
|
49
|
+
callbacks
|
|
50
|
+
)
|
|
44
51
|
|
|
45
52
|
logger.start(`Build timeline for translation`)
|
|
46
53
|
|
|
@@ -117,11 +124,11 @@ export async function alignTimelineToTextSemantically(timeline: Timeline, text:
|
|
|
117
124
|
return resultTimeline
|
|
118
125
|
}
|
|
119
126
|
|
|
120
|
-
export async function alignWordsToWordsSemantically(wordsGroups1: string[][], wordsGroups2: string[][], windowTokenCount = 20000) {
|
|
121
|
-
const logger = new Logger()
|
|
127
|
+
export async function alignWordsToWordsSemantically(wordsGroups1: string[][], wordsGroups2: string[][], windowTokenCount = 20000, callbacks: OperationCallbacks) {
|
|
128
|
+
const logger = new Logger(callbacks.logLevel)
|
|
122
129
|
|
|
123
130
|
// Load embedding model
|
|
124
|
-
const modelPath = await loadPackage(`xenova-multilingual-e5-small-fp16
|
|
131
|
+
const modelPath = await loadPackage(`xenova-multilingual-e5-small-fp16`, callbacks)
|
|
125
132
|
|
|
126
133
|
const embeddingModel = new E5TextEmbedding(modelPath)
|
|
127
134
|
|
|
@@ -129,7 +136,7 @@ export async function alignWordsToWordsSemantically(wordsGroups1: string[][], wo
|
|
|
129
136
|
await embeddingModel.initializeIfNeeded()
|
|
130
137
|
|
|
131
138
|
async function extractEmbeddingsFromWordGroups(wordGroups: string[][]) {
|
|
132
|
-
const logger = new Logger()
|
|
139
|
+
const logger = new Logger(callbacks.logLevel, 'trace')
|
|
133
140
|
|
|
134
141
|
const maxTokensPerFragment = 512
|
|
135
142
|
const { Tensor } = await import('@echogarden/transformers-nodejs-lite')
|