echogarden 1.4.4 → 1.6.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/data/schemas/options.json +310 -25
- package/dist/alignment/DTWMfccSequenceAlignment.d.ts +1 -1
- package/dist/alignment/DTWMfccSequenceAlignment.js +5 -5
- package/dist/alignment/DTWSequenceAlignmentWindowed.js +1 -3
- package/dist/alignment/DTWSequenceAlignmentWindowed.js.map +1 -1
- package/dist/alignment/{TextAlignment.d.ts → SemanticTextAlignment.d.ts} +4 -2
- package/dist/alignment/SemanticTextAlignment.js +336 -0
- package/dist/alignment/SemanticTextAlignment.js.map +1 -0
- package/dist/alignment/SpeechAlignment.d.ts +4 -3
- package/dist/alignment/SpeechAlignment.js +130 -39
- package/dist/alignment/SpeechAlignment.js.map +1 -1
- package/dist/api/API.d.ts +7 -3
- package/dist/api/API.js +7 -2
- package/dist/api/API.js.map +1 -1
- package/dist/api/APIOptions.d.ts +4 -1
- package/dist/api/Alignment.d.ts +1 -1
- package/dist/api/Alignment.js +13 -5
- package/dist/api/Alignment.js.map +1 -1
- package/dist/api/LanguageDetectionCommon.d.ts +6 -0
- package/dist/api/LanguageDetectionCommon.js +2 -0
- package/dist/api/LanguageDetectionCommon.js.map +1 -0
- package/dist/api/Recognition.js.map +1 -1
- package/dist/api/{LanguageDetection.d.ts → SpeechLanguageDetection.d.ts} +1 -25
- package/dist/api/{LanguageDetection.js → SpeechLanguageDetection.js} +1 -68
- package/dist/api/SpeechLanguageDetection.js.map +1 -0
- package/dist/api/{Translation.js → SpeechTranslation.js} +3 -3
- package/dist/api/SpeechTranslation.js.map +1 -0
- package/dist/api/Synthesis.d.ts +0 -1
- package/dist/api/Synthesis.js +4 -4
- package/dist/api/TextLanguageDetection.d.ts +21 -0
- package/dist/api/TextLanguageDetection.js +67 -0
- package/dist/api/TextLanguageDetection.js.map +1 -0
- package/dist/api/TextTranslation.d.ts +25 -0
- package/dist/api/TextTranslation.js +101 -0
- package/dist/api/TextTranslation.js.map +1 -0
- package/dist/api/TimelineTranslationAlignment.d.ts +23 -0
- package/dist/api/TimelineTranslationAlignment.js +92 -0
- package/dist/api/TimelineTranslationAlignment.js.map +1 -0
- package/dist/api/TranscriptAndTranslationAlignment.d.ts +35 -0
- package/dist/api/TranscriptAndTranslationAlignment.js +78 -0
- package/dist/api/TranscriptAndTranslationAlignment.js.map +1 -0
- package/dist/api/TranslationAlignment.d.ts +4 -3
- package/dist/api/TranslationAlignment.js +9 -8
- package/dist/api/TranslationAlignment.js.map +1 -1
- package/dist/api/VoiceActivityDetection.js +16 -1
- package/dist/api/VoiceActivityDetection.js.map +1 -1
- package/dist/audio/AudioBufferConversion.d.ts +0 -1
- package/dist/audio/AudioPlayer.d.ts +0 -1
- package/dist/audio/AudioPlayer.js +62 -41
- package/dist/audio/AudioPlayer.js.map +1 -1
- package/dist/audio/AudioUtilities.d.ts +0 -1
- package/dist/cli/CLI.d.ts +28 -7
- package/dist/cli/CLI.js +265 -37
- package/dist/cli/CLI.js.map +1 -1
- package/dist/codecs/FFMpegTranscoder.d.ts +0 -1
- package/dist/codecs/FFMpegTranscoder.js +7 -0
- package/dist/codecs/FFMpegTranscoder.js.map +1 -1
- package/dist/codecs/TIMITCodec.d.ts +0 -1
- package/dist/codecs/WaveCodec.d.ts +0 -1
- package/dist/dsp/FFT.d.ts +1 -1
- package/dist/dsp/FFT.js +6 -0
- package/dist/dsp/FFT.js.map +1 -1
- package/dist/dsp/KWeightingFilter.js +1 -1
- package/dist/dsp/KWeightingFilter.js.map +1 -1
- package/dist/dsp/MelSpectogram.d.ts +3 -2
- package/dist/dsp/MelSpectogram.js +14 -8
- package/dist/dsp/MelSpectogram.js.map +1 -1
- package/dist/math/VectorMath.d.ts +9 -9
- package/dist/math/VectorMath.js +10 -10
- package/dist/math/VectorMath.js.map +1 -1
- package/dist/nlp/ChineseSegmentation.js +4 -4
- package/dist/nlp/ChineseSegmentation.js.map +1 -1
- package/dist/nlp/Segmentation.d.ts +2 -2
- package/dist/nlp/Segmentation.js +20 -13
- package/dist/nlp/Segmentation.js.map +1 -1
- package/dist/recognition/OpenAICloudSTT.d.ts +2 -1
- package/dist/recognition/OpenAICloudSTT.js +30 -19
- package/dist/recognition/OpenAICloudSTT.js.map +1 -1
- package/dist/recognition/SileroSTT.d.ts +0 -1
- package/dist/recognition/WhisperCppSTT.d.ts +3 -3
- package/dist/recognition/WhisperCppSTT.js +21 -9
- package/dist/recognition/WhisperCppSTT.js.map +1 -1
- package/dist/recognition/WhisperSTT.d.ts +9 -6
- package/dist/recognition/WhisperSTT.js +227 -46
- package/dist/recognition/WhisperSTT.js.map +1 -1
- package/dist/server/Client.d.ts +3 -4
- package/dist/server/Client.js.map +1 -1
- package/dist/server/Worker.d.ts +3 -3
- package/dist/server/Worker.js +3 -2
- package/dist/server/Worker.js.map +1 -1
- package/dist/source-separation/MDXNetSourceSeparation.d.ts +0 -1
- package/dist/source-separation/MDXNetSourceSeparation.js +1 -1
- package/dist/source-separation/MDXNetSourceSeparation.js.map +1 -1
- package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.d.ts +12 -0
- package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.js +68 -0
- package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.js.map +1 -0
- package/dist/speech-language-detection/SileroLanguageDetection.d.ts +1 -2
- package/dist/speech-language-detection/SileroLanguageDetection.js +1 -1
- package/dist/speech-language-detection/SileroLanguageDetection.js.map +1 -1
- package/dist/subtitles/Subtitles.js +2 -2
- package/dist/subtitles/Subtitles.js.map +1 -1
- package/dist/synthesis/GoogleCloudTTS.d.ts +0 -1
- package/dist/synthesis/GoogleTranslateTTS.d.ts +0 -1
- package/dist/synthesis/GoogleTranslateTTS.js +6 -21
- package/dist/synthesis/GoogleTranslateTTS.js.map +1 -1
- package/dist/synthesis/StreamlabsPollyTTS.d.ts +0 -1
- package/dist/synthesis/VitsTTS.d.ts +0 -1
- package/dist/synthesis/VitsTTS.js +30 -0
- package/dist/synthesis/VitsTTS.js.map +1 -1
- package/dist/tests/Test.js +0 -31
- package/dist/tests/Test.js.map +1 -1
- package/dist/text-language-detection/FastTextLanguageDetection.d.ts +1 -1
- package/dist/text-language-detection/FastTextLanguageDetection.js.map +1 -1
- package/dist/text-language-detection/TinyLDLanguageDetection.d.ts +1 -1
- package/dist/text-language-detection/TinyLDLanguageDetection.js.map +1 -1
- package/dist/text-translation/DeepLTextTranslation.d.ts +2 -0
- package/dist/text-translation/DeepLTextTranslation.js +67 -0
- package/dist/text-translation/DeepLTextTranslation.js.map +1 -0
- package/dist/text-translation/GoogleTranslateTextTranslation.d.ts +10 -0
- package/dist/text-translation/GoogleTranslateTextTranslation.js +554 -0
- package/dist/text-translation/GoogleTranslateTextTranslation.js.map +1 -0
- package/dist/text-translation/NLLBTextTranslation.d.ts +2 -1
- package/dist/text-translation/NLLBTextTranslation.js +249 -19
- package/dist/text-translation/NLLBTextTranslation.js.map +1 -1
- package/dist/utilities/BinaryArrayConversion.d.ts +0 -1
- package/dist/utilities/BrowserRequestHeaders.d.ts +6 -0
- package/dist/utilities/BrowserRequestHeaders.js +52 -0
- package/dist/utilities/BrowserRequestHeaders.js.map +1 -0
- package/dist/utilities/BufferFileReadStream.d.ts +20 -0
- package/dist/utilities/BufferFileReadStream.js +81 -0
- package/dist/utilities/BufferFileReadStream.js.map +1 -0
- package/dist/utilities/DynamicUint8Array.d.ts +9 -0
- package/dist/utilities/DynamicUint8Array.js +31 -0
- package/dist/utilities/DynamicUint8Array.js.map +1 -0
- package/dist/utilities/FileSystem.d.ts +0 -2
- package/dist/utilities/Hashing.d.ts +3 -10
- package/dist/utilities/Hashing.js +10 -127
- package/dist/utilities/Hashing.js.map +1 -1
- package/dist/utilities/LEB128.d.ts +15 -5
- package/dist/utilities/LEB128.js +199 -119
- package/dist/utilities/LEB128.js.map +1 -1
- package/dist/utilities/LPVarInt.d.ts +11 -0
- package/dist/utilities/LPVarInt.js +187 -0
- package/dist/utilities/LPVarInt.js.map +1 -0
- package/dist/utilities/Locale.d.ts +1 -1
- package/dist/utilities/Locale.js +1 -1
- package/dist/utilities/OnnxUtilities.d.ts +1 -2
- package/dist/utilities/PVarInt.d.ts +4 -0
- package/dist/utilities/PVarInt.js +166 -0
- package/dist/utilities/PVarInt.js.map +1 -0
- package/dist/utilities/PackageManager.js +48 -25
- package/dist/utilities/PackageManager.js.map +1 -1
- package/dist/utilities/RandomGenerator.d.ts +3 -17
- package/dist/utilities/RandomGenerator.js +12 -81
- package/dist/utilities/RandomGenerator.js.map +1 -1
- package/dist/utilities/Timeline.d.ts +2 -0
- package/dist/utilities/Timeline.js +129 -20
- package/dist/utilities/Timeline.js.map +1 -1
- package/dist/utilities/Utilities.d.ts +1 -3
- package/dist/utilities/Utilities.js +30 -3
- package/dist/utilities/Utilities.js.map +1 -1
- package/dist/utilities/VarInt.d.ts +4 -0
- package/dist/utilities/VarInt.js +166 -0
- package/dist/utilities/VarInt.js.map +1 -0
- package/dist/utilities/VirtualFileReadStream.d.ts +20 -0
- package/dist/utilities/VirtualFileReadStream.js +79 -0
- package/dist/utilities/VirtualFileReadStream.js.map +1 -0
- package/dist/utilities/WebReader.js +7 -23
- package/dist/utilities/WebReader.js.map +1 -1
- package/dist/voice-activity-detection/SileroVAD.d.ts +0 -1
- package/docs/API.md +105 -3
- package/docs/CLI.md +51 -1
- package/docs/Engines.md +32 -3
- package/docs/Options.md +53 -12
- package/docs/Tasklist.md +1 -13
- package/package.json +20 -24
- package/src/alignment/DTWMfccSequenceAlignment.ts +5 -5
- package/src/alignment/DTWSequenceAlignmentWindowed.ts +1 -3
- package/src/alignment/SemanticTextAlignment.ts +467 -0
- package/src/alignment/SpeechAlignment.ts +214 -56
- package/src/api/API.ts +18 -2
- package/src/api/APIOptions.ts +14 -1
- package/src/api/Alignment.ts +31 -9
- package/src/api/LanguageDetectionCommon.ts +7 -0
- package/src/api/Recognition.ts +2 -0
- package/src/api/{LanguageDetection.ts → SpeechLanguageDetection.ts} +1 -119
- package/src/api/{Translation.ts → SpeechTranslation.ts} +2 -2
- package/src/api/Synthesis.ts +4 -4
- package/src/api/TextLanguageDetection.ts +116 -0
- package/src/api/TextTranslation.ts +177 -0
- package/src/api/TimelineTranslationAlignment.ts +162 -0
- package/src/api/TranscriptAndTranslationAlignment.ts +164 -0
- package/src/api/TranslationAlignment.ts +12 -10
- package/src/api/VoiceActivityDetection.ts +24 -3
- package/src/audio/AudioPlayer.ts +2 -0
- package/src/cli/CLI.ts +376 -40
- package/src/codecs/FFMpegTranscoder.ts +6 -0
- package/src/dsp/FFT.ts +8 -2
- package/src/dsp/KWeightingFilter.ts +1 -1
- package/src/dsp/MelSpectogram.ts +17 -8
- package/src/math/VectorMath.ts +15 -15
- package/src/nlp/ChineseSegmentation.ts +6 -4
- package/src/nlp/Segmentation.ts +18 -13
- package/src/recognition/OpenAICloudSTT.ts +47 -29
- package/src/recognition/WhisperCppSTT.ts +26 -11
- package/src/recognition/WhisperSTT.ts +364 -49
- package/src/server/Client.ts +3 -2
- package/src/server/Worker.ts +3 -2
- package/src/source-separation/MDXNetSourceSeparation.ts +1 -1
- package/src/speech-embeddings/WavToVec2BertFeatureEmbeddings.ts +107 -0
- package/src/speech-language-detection/SileroLanguageDetection.ts +2 -1
- package/src/subtitles/Subtitles.ts +2 -2
- package/src/synthesis/GoogleTranslateTTS.ts +7 -21
- package/src/synthesis/VitsTTS.ts +31 -3
- package/src/tests/Test.ts +1 -38
- package/src/text-language-detection/FastTextLanguageDetection.ts +1 -1
- package/src/text-language-detection/TinyLDLanguageDetection.ts +1 -1
- package/src/text-translation/DeepLTextTranslation.ts +88 -0
- package/src/text-translation/GoogleTranslateTextTranslation.ts +667 -0
- package/src/text-translation/NLLBTextTranslation.ts +261 -21
- package/src/typings/Fillers.d.ts +25 -2
- package/src/utilities/BrowserRequestHeaders.ts +59 -0
- package/src/utilities/DynamicUint8Array.ts +39 -0
- package/src/utilities/Hashing.ts +14 -167
- package/src/utilities/LEB128.ts +273 -148
- package/src/utilities/LPVarInt.ts +292 -0
- package/src/utilities/Locale.ts +1 -1
- package/src/utilities/OnnxUtilities.ts +1 -1
- package/src/utilities/PackageManager.ts +51 -30
- package/src/utilities/RandomGenerator.ts +12 -113
- package/src/utilities/Timeline.ts +162 -23
- package/src/utilities/Utilities.ts +40 -3
- package/src/utilities/VirtualFileReadStream.ts +109 -0
- package/src/utilities/WebReader.ts +9 -23
- package/dist/alignment/TextAlignment.js +0 -156
- package/dist/alignment/TextAlignment.js.map +0 -1
- package/dist/api/LanguageDetection.js.map +0 -1
- package/dist/api/Translation.js.map +0 -1
- package/src/alignment/TextAlignment.ts +0 -234
- /package/dist/api/{Translation.d.ts → SpeechTranslation.d.ts} +0 -0
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
"APIOptions": {
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
|
-
"VoiceListRequestOptions": {
|
|
9
|
-
"$ref": "#/definitions/VoiceListRequestOptions"
|
|
10
|
-
},
|
|
11
8
|
"SynthesisOptions": {
|
|
12
9
|
"$ref": "#/definitions/SynthesisOptions"
|
|
13
10
|
},
|
|
11
|
+
"VoiceListRequestOptions": {
|
|
12
|
+
"$ref": "#/definitions/VoiceListRequestOptions"
|
|
13
|
+
},
|
|
14
14
|
"RecognitionOptions": {
|
|
15
15
|
"$ref": "#/definitions/RecognitionOptions"
|
|
16
16
|
},
|
|
@@ -20,9 +20,18 @@
|
|
|
20
20
|
"TranslationAlignmentOptions": {
|
|
21
21
|
"$ref": "#/definitions/TranslationAlignmentOptions"
|
|
22
22
|
},
|
|
23
|
+
"TranscriptAndTranslationAlignmentOptions": {
|
|
24
|
+
"$ref": "#/definitions/TranscriptAndTranslationAlignmentOptions"
|
|
25
|
+
},
|
|
26
|
+
"TimelineTranslationAlignmentOptions": {
|
|
27
|
+
"$ref": "#/definitions/TimelineTranslationAlignmentOptions"
|
|
28
|
+
},
|
|
23
29
|
"SpeechTranslationOptions": {
|
|
24
30
|
"$ref": "#/definitions/SpeechTranslationOptions"
|
|
25
31
|
},
|
|
32
|
+
"TextTranslationOptions": {
|
|
33
|
+
"$ref": "#/definitions/TextTranslationOptions"
|
|
34
|
+
},
|
|
26
35
|
"SpeechLanguageDetectionOptions": {
|
|
27
36
|
"$ref": "#/definitions/SpeechLanguageDetectionOptions"
|
|
28
37
|
},
|
|
@@ -49,12 +58,15 @@
|
|
|
49
58
|
}
|
|
50
59
|
},
|
|
51
60
|
"required": [
|
|
52
|
-
"VoiceListRequestOptions",
|
|
53
61
|
"SynthesisOptions",
|
|
62
|
+
"VoiceListRequestOptions",
|
|
54
63
|
"RecognitionOptions",
|
|
55
64
|
"AlignmentOptions",
|
|
56
65
|
"TranslationAlignmentOptions",
|
|
66
|
+
"TranscriptAndTranslationAlignmentOptions",
|
|
67
|
+
"TimelineTranslationAlignmentOptions",
|
|
57
68
|
"SpeechTranslationOptions",
|
|
69
|
+
"TextTranslationOptions",
|
|
58
70
|
"SpeechLanguageDetectionOptions",
|
|
59
71
|
"TextLanguageDetectionOptions",
|
|
60
72
|
"VADOptions",
|
|
@@ -66,7 +78,7 @@
|
|
|
66
78
|
],
|
|
67
79
|
"additionalProperties": false
|
|
68
80
|
},
|
|
69
|
-
"
|
|
81
|
+
"SynthesisOptions": {
|
|
70
82
|
"type": "object",
|
|
71
83
|
"properties": {
|
|
72
84
|
"engine": {
|
|
@@ -356,18 +368,6 @@
|
|
|
356
368
|
"streamlabsPolly": {
|
|
357
369
|
"type": "object",
|
|
358
370
|
"additionalProperties": false
|
|
359
|
-
},
|
|
360
|
-
"cache": {
|
|
361
|
-
"type": "object",
|
|
362
|
-
"properties": {
|
|
363
|
-
"path": {
|
|
364
|
-
"type": "string"
|
|
365
|
-
},
|
|
366
|
-
"duration": {
|
|
367
|
-
"type": "number"
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
"additionalProperties": false
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
373
|
"additionalProperties": false
|
|
@@ -513,6 +513,7 @@
|
|
|
513
513
|
"enum": [
|
|
514
514
|
"dtw",
|
|
515
515
|
"dtw-ra",
|
|
516
|
+
"dtw-ea",
|
|
516
517
|
"whisper"
|
|
517
518
|
]
|
|
518
519
|
},
|
|
@@ -614,7 +615,8 @@
|
|
|
614
615
|
"type": "string",
|
|
615
616
|
"enum": [
|
|
616
617
|
"cpu",
|
|
617
|
-
"dml"
|
|
618
|
+
"dml",
|
|
619
|
+
"cuda"
|
|
618
620
|
]
|
|
619
621
|
},
|
|
620
622
|
"WhisperVADOptions": {
|
|
@@ -646,10 +648,10 @@
|
|
|
646
648
|
"small.en",
|
|
647
649
|
"medium",
|
|
648
650
|
"medium.en",
|
|
649
|
-
"large",
|
|
650
651
|
"large-v1",
|
|
651
652
|
"large-v2",
|
|
652
|
-
"large-v3"
|
|
653
|
+
"large-v3",
|
|
654
|
+
"large-v3-turbo"
|
|
653
655
|
]
|
|
654
656
|
},
|
|
655
657
|
"AdaptiveGateVADOptions": {
|
|
@@ -1000,7 +1002,6 @@
|
|
|
1000
1002
|
"type": "string",
|
|
1001
1003
|
"enum": [
|
|
1002
1004
|
"cpu",
|
|
1003
|
-
"cublas-11.8.0",
|
|
1004
1005
|
"cublas-12.4.0",
|
|
1005
1006
|
"custom"
|
|
1006
1007
|
]
|
|
@@ -1030,7 +1031,9 @@
|
|
|
1030
1031
|
"large-v2",
|
|
1031
1032
|
"large-v2-q5_0",
|
|
1032
1033
|
"large-v3",
|
|
1033
|
-
"large-v3-q5_0"
|
|
1034
|
+
"large-v3-q5_0",
|
|
1035
|
+
"large-v3-turbo",
|
|
1036
|
+
"large-v3-turbo-q5_0"
|
|
1034
1037
|
]
|
|
1035
1038
|
},
|
|
1036
1039
|
"SourceSeparationOptions": {
|
|
@@ -1125,8 +1128,7 @@
|
|
|
1125
1128
|
"type": "object",
|
|
1126
1129
|
"properties": {
|
|
1127
1130
|
"model": {
|
|
1128
|
-
"type": "string"
|
|
1129
|
-
"const": "whisper-1"
|
|
1131
|
+
"type": "string"
|
|
1130
1132
|
},
|
|
1131
1133
|
"apiKey": {
|
|
1132
1134
|
"type": "string"
|
|
@@ -1148,6 +1150,9 @@
|
|
|
1148
1150
|
},
|
|
1149
1151
|
"maxRetries": {
|
|
1150
1152
|
"type": "number"
|
|
1153
|
+
},
|
|
1154
|
+
"requestWordTimestamps": {
|
|
1155
|
+
"type": "boolean"
|
|
1151
1156
|
}
|
|
1152
1157
|
},
|
|
1153
1158
|
"additionalProperties": false
|
|
@@ -1306,7 +1311,7 @@
|
|
|
1306
1311
|
},
|
|
1307
1312
|
"additionalProperties": false
|
|
1308
1313
|
},
|
|
1309
|
-
"
|
|
1314
|
+
"VoiceListRequestOptions": {
|
|
1310
1315
|
"type": "object",
|
|
1311
1316
|
"properties": {
|
|
1312
1317
|
"engine": {
|
|
@@ -1596,6 +1601,18 @@
|
|
|
1596
1601
|
"streamlabsPolly": {
|
|
1597
1602
|
"type": "object",
|
|
1598
1603
|
"additionalProperties": false
|
|
1604
|
+
},
|
|
1605
|
+
"cache": {
|
|
1606
|
+
"type": "object",
|
|
1607
|
+
"properties": {
|
|
1608
|
+
"path": {
|
|
1609
|
+
"type": "string"
|
|
1610
|
+
},
|
|
1611
|
+
"duration": {
|
|
1612
|
+
"type": "number"
|
|
1613
|
+
}
|
|
1614
|
+
},
|
|
1615
|
+
"additionalProperties": false
|
|
1599
1616
|
}
|
|
1600
1617
|
},
|
|
1601
1618
|
"additionalProperties": false
|
|
@@ -1643,6 +1660,236 @@
|
|
|
1643
1660
|
"type": "string",
|
|
1644
1661
|
"const": "whisper"
|
|
1645
1662
|
},
|
|
1663
|
+
"TranscriptAndTranslationAlignmentOptions": {
|
|
1664
|
+
"type": "object",
|
|
1665
|
+
"properties": {
|
|
1666
|
+
"engine": {
|
|
1667
|
+
"$ref": "#/definitions/TranscriptAndTranslationAlignmentEngine"
|
|
1668
|
+
},
|
|
1669
|
+
"sourceLanguage": {
|
|
1670
|
+
"type": "string"
|
|
1671
|
+
},
|
|
1672
|
+
"targetLanguage": {
|
|
1673
|
+
"type": "string"
|
|
1674
|
+
},
|
|
1675
|
+
"isolate": {
|
|
1676
|
+
"type": "boolean"
|
|
1677
|
+
},
|
|
1678
|
+
"crop": {
|
|
1679
|
+
"type": "boolean"
|
|
1680
|
+
},
|
|
1681
|
+
"alignment": {
|
|
1682
|
+
"$ref": "#/definitions/AlignmentOptions"
|
|
1683
|
+
},
|
|
1684
|
+
"timelineAlignment": {
|
|
1685
|
+
"$ref": "#/definitions/TimelineTranslationAlignmentOptions"
|
|
1686
|
+
},
|
|
1687
|
+
"languageDetection": {
|
|
1688
|
+
"$ref": "#/definitions/TextLanguageDetectionOptions"
|
|
1689
|
+
},
|
|
1690
|
+
"vad": {
|
|
1691
|
+
"$ref": "#/definitions/VADOptions"
|
|
1692
|
+
},
|
|
1693
|
+
"plainText": {
|
|
1694
|
+
"$ref": "#/definitions/PlainTextOptions"
|
|
1695
|
+
},
|
|
1696
|
+
"subtitles": {
|
|
1697
|
+
"$ref": "#/definitions/SubtitlesConfig"
|
|
1698
|
+
},
|
|
1699
|
+
"sourceSeparation": {
|
|
1700
|
+
"$ref": "#/definitions/SourceSeparationOptions"
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
"additionalProperties": false
|
|
1704
|
+
},
|
|
1705
|
+
"TranscriptAndTranslationAlignmentEngine": {
|
|
1706
|
+
"type": "string",
|
|
1707
|
+
"const": "two-stage"
|
|
1708
|
+
},
|
|
1709
|
+
"TimelineTranslationAlignmentOptions": {
|
|
1710
|
+
"type": "object",
|
|
1711
|
+
"properties": {
|
|
1712
|
+
"engine": {
|
|
1713
|
+
"type": "string",
|
|
1714
|
+
"const": "e5"
|
|
1715
|
+
},
|
|
1716
|
+
"sourceLanguage": {
|
|
1717
|
+
"type": "string"
|
|
1718
|
+
},
|
|
1719
|
+
"targetLanguage": {
|
|
1720
|
+
"type": "string"
|
|
1721
|
+
},
|
|
1722
|
+
"audio": {
|
|
1723
|
+
"$ref": "#/definitions/AudioSourceParam"
|
|
1724
|
+
},
|
|
1725
|
+
"languageDetection": {
|
|
1726
|
+
"$ref": "#/definitions/TextLanguageDetectionOptions"
|
|
1727
|
+
},
|
|
1728
|
+
"subtitles": {
|
|
1729
|
+
"$ref": "#/definitions/SubtitlesConfig"
|
|
1730
|
+
},
|
|
1731
|
+
"e5": {
|
|
1732
|
+
"type": "object",
|
|
1733
|
+
"properties": {
|
|
1734
|
+
"model": {
|
|
1735
|
+
"type": "string",
|
|
1736
|
+
"const": "small-fp16"
|
|
1737
|
+
}
|
|
1738
|
+
},
|
|
1739
|
+
"required": [
|
|
1740
|
+
"model"
|
|
1741
|
+
],
|
|
1742
|
+
"additionalProperties": false
|
|
1743
|
+
}
|
|
1744
|
+
},
|
|
1745
|
+
"additionalProperties": false
|
|
1746
|
+
},
|
|
1747
|
+
"AudioSourceParam": {
|
|
1748
|
+
"anyOf": [
|
|
1749
|
+
{
|
|
1750
|
+
"type": "string"
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"$ref": "#/definitions/global.Buffer"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"type": "object",
|
|
1757
|
+
"properties": {
|
|
1758
|
+
"BYTES_PER_ELEMENT": {
|
|
1759
|
+
"type": "number"
|
|
1760
|
+
},
|
|
1761
|
+
"buffer": {
|
|
1762
|
+
"type": "object",
|
|
1763
|
+
"properties": {
|
|
1764
|
+
"byteLength": {
|
|
1765
|
+
"type": "number"
|
|
1766
|
+
}
|
|
1767
|
+
},
|
|
1768
|
+
"required": [
|
|
1769
|
+
"byteLength"
|
|
1770
|
+
],
|
|
1771
|
+
"additionalProperties": false
|
|
1772
|
+
},
|
|
1773
|
+
"byteLength": {
|
|
1774
|
+
"type": "number"
|
|
1775
|
+
},
|
|
1776
|
+
"byteOffset": {
|
|
1777
|
+
"type": "number"
|
|
1778
|
+
},
|
|
1779
|
+
"length": {
|
|
1780
|
+
"type": "number"
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
"required": [
|
|
1784
|
+
"BYTES_PER_ELEMENT",
|
|
1785
|
+
"buffer",
|
|
1786
|
+
"byteLength",
|
|
1787
|
+
"byteOffset",
|
|
1788
|
+
"length"
|
|
1789
|
+
],
|
|
1790
|
+
"additionalProperties": {
|
|
1791
|
+
"type": "number"
|
|
1792
|
+
}
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"$ref": "#/definitions/RawAudio"
|
|
1796
|
+
}
|
|
1797
|
+
]
|
|
1798
|
+
},
|
|
1799
|
+
"global.Buffer": {
|
|
1800
|
+
"type": "object",
|
|
1801
|
+
"additionalProperties": {
|
|
1802
|
+
"type": "number"
|
|
1803
|
+
},
|
|
1804
|
+
"properties": {
|
|
1805
|
+
"BYTES_PER_ELEMENT": {
|
|
1806
|
+
"type": "number"
|
|
1807
|
+
},
|
|
1808
|
+
"buffer": {
|
|
1809
|
+
"type": "object",
|
|
1810
|
+
"properties": {
|
|
1811
|
+
"byteLength": {
|
|
1812
|
+
"type": "number"
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
"required": [
|
|
1816
|
+
"byteLength"
|
|
1817
|
+
],
|
|
1818
|
+
"additionalProperties": false
|
|
1819
|
+
},
|
|
1820
|
+
"byteLength": {
|
|
1821
|
+
"type": "number"
|
|
1822
|
+
},
|
|
1823
|
+
"byteOffset": {
|
|
1824
|
+
"type": "number"
|
|
1825
|
+
},
|
|
1826
|
+
"length": {
|
|
1827
|
+
"type": "number"
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
"required": [
|
|
1831
|
+
"BYTES_PER_ELEMENT",
|
|
1832
|
+
"buffer",
|
|
1833
|
+
"byteLength",
|
|
1834
|
+
"byteOffset",
|
|
1835
|
+
"length"
|
|
1836
|
+
]
|
|
1837
|
+
},
|
|
1838
|
+
"RawAudio": {
|
|
1839
|
+
"type": "object",
|
|
1840
|
+
"properties": {
|
|
1841
|
+
"audioChannels": {
|
|
1842
|
+
"type": "array",
|
|
1843
|
+
"items": {
|
|
1844
|
+
"type": "object",
|
|
1845
|
+
"properties": {
|
|
1846
|
+
"BYTES_PER_ELEMENT": {
|
|
1847
|
+
"type": "number"
|
|
1848
|
+
},
|
|
1849
|
+
"buffer": {
|
|
1850
|
+
"type": "object",
|
|
1851
|
+
"properties": {
|
|
1852
|
+
"byteLength": {
|
|
1853
|
+
"type": "number"
|
|
1854
|
+
}
|
|
1855
|
+
},
|
|
1856
|
+
"required": [
|
|
1857
|
+
"byteLength"
|
|
1858
|
+
],
|
|
1859
|
+
"additionalProperties": false
|
|
1860
|
+
},
|
|
1861
|
+
"byteLength": {
|
|
1862
|
+
"type": "number"
|
|
1863
|
+
},
|
|
1864
|
+
"byteOffset": {
|
|
1865
|
+
"type": "number"
|
|
1866
|
+
},
|
|
1867
|
+
"length": {
|
|
1868
|
+
"type": "number"
|
|
1869
|
+
}
|
|
1870
|
+
},
|
|
1871
|
+
"required": [
|
|
1872
|
+
"BYTES_PER_ELEMENT",
|
|
1873
|
+
"buffer",
|
|
1874
|
+
"byteLength",
|
|
1875
|
+
"byteOffset",
|
|
1876
|
+
"length"
|
|
1877
|
+
],
|
|
1878
|
+
"additionalProperties": {
|
|
1879
|
+
"type": "number"
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1883
|
+
"sampleRate": {
|
|
1884
|
+
"type": "number"
|
|
1885
|
+
}
|
|
1886
|
+
},
|
|
1887
|
+
"required": [
|
|
1888
|
+
"audioChannels",
|
|
1889
|
+
"sampleRate"
|
|
1890
|
+
],
|
|
1891
|
+
"additionalProperties": false
|
|
1892
|
+
},
|
|
1646
1893
|
"SpeechTranslationOptions": {
|
|
1647
1894
|
"type": "object",
|
|
1648
1895
|
"properties": {
|
|
@@ -1693,6 +1940,44 @@
|
|
|
1693
1940
|
"openai-cloud"
|
|
1694
1941
|
]
|
|
1695
1942
|
},
|
|
1943
|
+
"TextTranslationOptions": {
|
|
1944
|
+
"type": "object",
|
|
1945
|
+
"properties": {
|
|
1946
|
+
"engine": {
|
|
1947
|
+
"$ref": "#/definitions/TextTranslationEngine"
|
|
1948
|
+
},
|
|
1949
|
+
"sourceLanguage": {
|
|
1950
|
+
"type": "string"
|
|
1951
|
+
},
|
|
1952
|
+
"targetLanguage": {
|
|
1953
|
+
"type": "string"
|
|
1954
|
+
},
|
|
1955
|
+
"languageDetection": {
|
|
1956
|
+
"$ref": "#/definitions/TextLanguageDetectionOptions"
|
|
1957
|
+
},
|
|
1958
|
+
"nllb": {
|
|
1959
|
+
"type": "object",
|
|
1960
|
+
"additionalProperties": false
|
|
1961
|
+
},
|
|
1962
|
+
"googleTranslate": {
|
|
1963
|
+
"type": "object",
|
|
1964
|
+
"additionalProperties": false
|
|
1965
|
+
},
|
|
1966
|
+
"deepl": {
|
|
1967
|
+
"type": "object",
|
|
1968
|
+
"additionalProperties": false
|
|
1969
|
+
}
|
|
1970
|
+
},
|
|
1971
|
+
"additionalProperties": false
|
|
1972
|
+
},
|
|
1973
|
+
"TextTranslationEngine": {
|
|
1974
|
+
"type": "string",
|
|
1975
|
+
"enum": [
|
|
1976
|
+
"nllb",
|
|
1977
|
+
"google-translate",
|
|
1978
|
+
"deepl"
|
|
1979
|
+
]
|
|
1980
|
+
},
|
|
1696
1981
|
"DenoisingOptions": {
|
|
1697
1982
|
"type": "object",
|
|
1698
1983
|
"properties": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function alignMFCC_DTW(mfccFrames1: number[][], mfccFrames2: number[][], windowLength: number, distanceFunctionKind?: '
|
|
1
|
+
export declare function alignMFCC_DTW(mfccFrames1: number[][], mfccFrames2: number[][], windowLength: number, distanceFunctionKind?: 'euclidean' | 'cosine', centerIndexes?: number[]): Promise<import("./SpeechAlignment.js").AlignmentPath>;
|
|
2
2
|
export declare function getCostMatrixMemorySizeMB(sequence1Length: number, sequence2Length: number, windowLength: number): number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { cosineDistancePrecomputedMagnitudes, createVectorForIntegerRange,
|
|
1
|
+
import { cosineDistancePrecomputedMagnitudes, createVectorForIntegerRange, euclideanDistance, euclideanDistance13Dim, magnitude } from '../math/VectorMath.js';
|
|
2
2
|
import { logToStderr } from '../utilities/Utilities.js';
|
|
3
3
|
import { alignDTWWindowed } from './DTWSequenceAlignmentWindowed.js';
|
|
4
4
|
const log = logToStderr;
|
|
5
|
-
export async function alignMFCC_DTW(mfccFrames1, mfccFrames2, windowLength, distanceFunctionKind = '
|
|
6
|
-
if (distanceFunctionKind == '
|
|
7
|
-
let distanceFunction =
|
|
5
|
+
export async function alignMFCC_DTW(mfccFrames1, mfccFrames2, windowLength, distanceFunctionKind = 'euclidean', centerIndexes) {
|
|
6
|
+
if (distanceFunctionKind == 'euclidean') {
|
|
7
|
+
let distanceFunction = euclideanDistance;
|
|
8
8
|
if (mfccFrames1.length > 0 && mfccFrames1[0].length === 13) {
|
|
9
|
-
distanceFunction =
|
|
9
|
+
distanceFunction = euclideanDistance13Dim;
|
|
10
10
|
}
|
|
11
11
|
const { path } = alignDTWWindowed(mfccFrames1, mfccFrames2, distanceFunction, windowLength, centerIndexes);
|
|
12
12
|
return path;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { logToStderr } from '../utilities/Utilities.js';
|
|
2
2
|
const log = logToStderr;
|
|
3
3
|
export function alignDTWWindowed(sequence1, sequence2, costFunction, windowMaxLength, centerIndexes) {
|
|
4
|
-
|
|
5
|
-
throw new Error('Window length must be greater or equal to 2');
|
|
6
|
-
}
|
|
4
|
+
windowMaxLength = Math.max(windowMaxLength, 2);
|
|
7
5
|
if (sequence1.length == 0 || sequence2.length == 0) {
|
|
8
6
|
return {
|
|
9
7
|
path: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DTWSequenceAlignmentWindowed.js","sourceRoot":"","sources":["../../src/alignment/DTWSequenceAlignmentWindowed.ts"],"names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AAU,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU;IACrD,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAA;IACV,CAAC;SAAM,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QACrB,OAAO,EAAE,CAAA;IACV,CAAC;SAAM,CAAC;QACP,OAAO,EAAE,CAAA;IACV,CAAC;AACF,CAAC;AAED,SAAS,oBAAoB,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU;IAC/D,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QAC1B,OAAO,CAAC,CAAA;IACT,CAAC;SAAM,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QACrB,OAAO,CAAC,CAAA;IACT,CAAC;SAAM,CAAC;QACP,OAAO,CAAC,CAAA;IACT,CAAC;AACF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type PreTrainedModel, type PreTrainedTokenizer } from '@echogarden/transformers-nodejs-lite';
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
2
|
+
import { Timeline } from '../utilities/Timeline.js';
|
|
3
|
+
export declare function alignTimelineToTextSemantically(timeline: Timeline, text: string, textLangCode: string): Promise<Timeline>;
|
|
4
|
+
export declare function alignWordsToWordsSemantically(wordsGroups1: string[][], wordsGroups2: string[][], windowTokenCount?: number): Promise<WordMapping[]>;
|
|
4
5
|
export declare class E5TextEmbedding {
|
|
5
6
|
readonly modelPath: string;
|
|
6
7
|
tokenizer?: PreTrainedTokenizer;
|
|
@@ -21,3 +22,4 @@ export interface WordMapping {
|
|
|
21
22
|
wordIndex2: number;
|
|
22
23
|
word2: string;
|
|
23
24
|
}
|
|
25
|
+
export declare const e5SupportedLanguages: string[];
|