echogarden 1.5.0 → 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.
Files changed (150) hide show
  1. package/data/schemas/options.json +43 -6
  2. package/dist/alignment/DTWMfccSequenceAlignment.d.ts +1 -1
  3. package/dist/alignment/DTWMfccSequenceAlignment.js +5 -5
  4. package/dist/alignment/DTWSequenceAlignmentWindowed.js +1 -3
  5. package/dist/alignment/DTWSequenceAlignmentWindowed.js.map +1 -1
  6. package/dist/alignment/SemanticTextAlignment.js +1 -1
  7. package/dist/alignment/SemanticTextAlignment.js.map +1 -1
  8. package/dist/alignment/SpeechAlignment.d.ts +2 -2
  9. package/dist/alignment/SpeechAlignment.js +26 -3
  10. package/dist/alignment/SpeechAlignment.js.map +1 -1
  11. package/dist/api/API.d.ts +0 -1
  12. package/dist/api/Synthesis.d.ts +0 -1
  13. package/dist/api/TextTranslation.d.ts +21 -1
  14. package/dist/api/TextTranslation.js +99 -2
  15. package/dist/api/TextTranslation.js.map +1 -1
  16. package/dist/api/TimelineTranslationAlignment.js +1 -1
  17. package/dist/api/TimelineTranslationAlignment.js.map +1 -1
  18. package/dist/audio/AudioBufferConversion.d.ts +0 -1
  19. package/dist/audio/AudioPlayer.d.ts +0 -1
  20. package/dist/audio/AudioPlayer.js +62 -41
  21. package/dist/audio/AudioPlayer.js.map +1 -1
  22. package/dist/audio/AudioUtilities.d.ts +0 -1
  23. package/dist/cli/CLI.d.ts +1 -0
  24. package/dist/cli/CLI.js +61 -4
  25. package/dist/cli/CLI.js.map +1 -1
  26. package/dist/codecs/FFMpegTranscoder.d.ts +0 -1
  27. package/dist/codecs/TIMITCodec.d.ts +0 -1
  28. package/dist/codecs/WaveCodec.d.ts +0 -1
  29. package/dist/math/VectorMath.d.ts +4 -4
  30. package/dist/math/VectorMath.js +6 -6
  31. package/dist/nlp/ChineseSegmentation.js +4 -4
  32. package/dist/nlp/ChineseSegmentation.js.map +1 -1
  33. package/dist/nlp/Segmentation.d.ts +2 -2
  34. package/dist/nlp/Segmentation.js +20 -13
  35. package/dist/nlp/Segmentation.js.map +1 -1
  36. package/dist/recognition/OpenAICloudSTT.d.ts +2 -1
  37. package/dist/recognition/OpenAICloudSTT.js +30 -19
  38. package/dist/recognition/OpenAICloudSTT.js.map +1 -1
  39. package/dist/recognition/SileroSTT.d.ts +0 -1
  40. package/dist/recognition/WhisperCppSTT.d.ts +2 -2
  41. package/dist/recognition/WhisperCppSTT.js +19 -7
  42. package/dist/recognition/WhisperCppSTT.js.map +1 -1
  43. package/dist/recognition/WhisperSTT.d.ts +9 -6
  44. package/dist/recognition/WhisperSTT.js +218 -40
  45. package/dist/recognition/WhisperSTT.js.map +1 -1
  46. package/dist/server/Client.d.ts +0 -2
  47. package/dist/server/Worker.d.ts +0 -1
  48. package/dist/source-separation/MDXNetSourceSeparation.d.ts +0 -1
  49. package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.d.ts +0 -1
  50. package/dist/speech-language-detection/SileroLanguageDetection.d.ts +0 -1
  51. package/dist/subtitles/Subtitles.js +2 -2
  52. package/dist/subtitles/Subtitles.js.map +1 -1
  53. package/dist/synthesis/GoogleCloudTTS.d.ts +0 -1
  54. package/dist/synthesis/GoogleTranslateTTS.d.ts +0 -1
  55. package/dist/synthesis/GoogleTranslateTTS.js +6 -21
  56. package/dist/synthesis/GoogleTranslateTTS.js.map +1 -1
  57. package/dist/synthesis/StreamlabsPollyTTS.d.ts +0 -1
  58. package/dist/synthesis/VitsTTS.d.ts +0 -1
  59. package/dist/synthesis/VitsTTS.js +30 -0
  60. package/dist/synthesis/VitsTTS.js.map +1 -1
  61. package/dist/text-translation/DeepLTextTranslation.d.ts +2 -0
  62. package/dist/text-translation/DeepLTextTranslation.js +67 -0
  63. package/dist/text-translation/DeepLTextTranslation.js.map +1 -0
  64. package/dist/text-translation/GoogleTranslateTextTranslation.d.ts +10 -0
  65. package/dist/text-translation/GoogleTranslateTextTranslation.js +554 -0
  66. package/dist/text-translation/GoogleTranslateTextTranslation.js.map +1 -0
  67. package/dist/text-translation/NLLBTextTranslation.d.ts +2 -1
  68. package/dist/text-translation/NLLBTextTranslation.js +248 -18
  69. package/dist/text-translation/NLLBTextTranslation.js.map +1 -1
  70. package/dist/utilities/BinaryArrayConversion.d.ts +0 -1
  71. package/dist/utilities/BrowserRequestHeaders.d.ts +6 -0
  72. package/dist/utilities/BrowserRequestHeaders.js +52 -0
  73. package/dist/utilities/BrowserRequestHeaders.js.map +1 -0
  74. package/dist/utilities/BufferFileReadStream.d.ts +20 -0
  75. package/dist/utilities/BufferFileReadStream.js +81 -0
  76. package/dist/utilities/BufferFileReadStream.js.map +1 -0
  77. package/dist/utilities/DynamicUint8Array.d.ts +9 -0
  78. package/dist/utilities/DynamicUint8Array.js +31 -0
  79. package/dist/utilities/DynamicUint8Array.js.map +1 -0
  80. package/dist/utilities/FileSystem.d.ts +0 -2
  81. package/dist/utilities/Hashing.d.ts +3 -10
  82. package/dist/utilities/Hashing.js +10 -127
  83. package/dist/utilities/Hashing.js.map +1 -1
  84. package/dist/utilities/LEB128.d.ts +15 -5
  85. package/dist/utilities/LEB128.js +199 -119
  86. package/dist/utilities/LEB128.js.map +1 -1
  87. package/dist/utilities/LPVarInt.d.ts +11 -0
  88. package/dist/utilities/LPVarInt.js +187 -0
  89. package/dist/utilities/LPVarInt.js.map +1 -0
  90. package/dist/utilities/OnnxUtilities.d.ts +0 -1
  91. package/dist/utilities/PVarInt.d.ts +4 -0
  92. package/dist/utilities/PVarInt.js +166 -0
  93. package/dist/utilities/PVarInt.js.map +1 -0
  94. package/dist/utilities/PackageManager.js +43 -22
  95. package/dist/utilities/PackageManager.js.map +1 -1
  96. package/dist/utilities/RandomGenerator.d.ts +3 -17
  97. package/dist/utilities/RandomGenerator.js +12 -81
  98. package/dist/utilities/RandomGenerator.js.map +1 -1
  99. package/dist/utilities/Timeline.d.ts +1 -0
  100. package/dist/utilities/Timeline.js +117 -20
  101. package/dist/utilities/Timeline.js.map +1 -1
  102. package/dist/utilities/Utilities.d.ts +1 -3
  103. package/dist/utilities/Utilities.js +30 -3
  104. package/dist/utilities/Utilities.js.map +1 -1
  105. package/dist/utilities/VarInt.d.ts +4 -0
  106. package/dist/utilities/VarInt.js +166 -0
  107. package/dist/utilities/VarInt.js.map +1 -0
  108. package/dist/utilities/VirtualFileReadStream.d.ts +20 -0
  109. package/dist/utilities/VirtualFileReadStream.js +79 -0
  110. package/dist/utilities/VirtualFileReadStream.js.map +1 -0
  111. package/dist/utilities/WebReader.js +7 -23
  112. package/dist/utilities/WebReader.js.map +1 -1
  113. package/dist/voice-activity-detection/SileroVAD.d.ts +0 -1
  114. package/docs/API.md +24 -0
  115. package/docs/Engines.md +8 -3
  116. package/docs/Options.md +20 -11
  117. package/docs/Tasklist.md +1 -13
  118. package/package.json +20 -24
  119. package/src/alignment/DTWMfccSequenceAlignment.ts +5 -5
  120. package/src/alignment/DTWSequenceAlignmentWindowed.ts +1 -3
  121. package/src/alignment/SemanticTextAlignment.ts +1 -1
  122. package/src/alignment/SpeechAlignment.ts +37 -6
  123. package/src/api/TextTranslation.ts +170 -2
  124. package/src/api/TimelineTranslationAlignment.ts +1 -1
  125. package/src/audio/AudioPlayer.ts +2 -0
  126. package/src/cli/CLI.ts +101 -7
  127. package/src/math/VectorMath.ts +6 -6
  128. package/src/nlp/ChineseSegmentation.ts +6 -4
  129. package/src/nlp/Segmentation.ts +18 -13
  130. package/src/recognition/OpenAICloudSTT.ts +47 -29
  131. package/src/recognition/WhisperCppSTT.ts +24 -9
  132. package/src/recognition/WhisperSTT.ts +354 -43
  133. package/src/subtitles/Subtitles.ts +2 -2
  134. package/src/synthesis/GoogleTranslateTTS.ts +7 -21
  135. package/src/synthesis/VitsTTS.ts +31 -3
  136. package/src/text-translation/DeepLTextTranslation.ts +88 -0
  137. package/src/text-translation/GoogleTranslateTextTranslation.ts +667 -0
  138. package/src/text-translation/NLLBTextTranslation.ts +260 -20
  139. package/src/typings/Fillers.d.ts +25 -2
  140. package/src/utilities/BrowserRequestHeaders.ts +59 -0
  141. package/src/utilities/DynamicUint8Array.ts +39 -0
  142. package/src/utilities/Hashing.ts +14 -167
  143. package/src/utilities/LEB128.ts +273 -148
  144. package/src/utilities/LPVarInt.ts +292 -0
  145. package/src/utilities/PackageManager.ts +45 -27
  146. package/src/utilities/RandomGenerator.ts +12 -113
  147. package/src/utilities/Timeline.ts +148 -23
  148. package/src/utilities/Utilities.ts +40 -3
  149. package/src/utilities/VirtualFileReadStream.ts +109 -0
  150. package/src/utilities/WebReader.ts +9 -23
@@ -0,0 +1,166 @@
1
+ ////////////////////////////////////////////////////////////////////////////////////
2
+ // Encode signed integer
3
+ ////////////////////////////////////////////////////////////////////////////////////
4
+ export function encodeSignedInt32(value, outEncodedData) {
5
+ //const absValue = Math.abs(value)
6
+ const absMask = value >> 31;
7
+ const absValue = (value ^ absMask) - absMask;
8
+ if (absValue < (2 ** 6)) {
9
+ outEncodedData.push(value & 0b01111111);
10
+ }
11
+ else if (absValue < (2 ** 13)) {
12
+ outEncodedData.push((value & 0b00111111) | 0b10000000, (value >> 6) & 0b11111111);
13
+ }
14
+ else if (absValue < (2 ** 20)) {
15
+ outEncodedData.push((value & 0b00011111) | 0b11000000, (value >> 5) & 0b11111111, (value >> 13) & 0b11111111);
16
+ }
17
+ else if (absValue < (2 ** 27)) {
18
+ outEncodedData.push((value & 0b00001111) | 0b11100000, (value >> 4) & 0b11111111, (value >> 12) & 0b11111111, (value >> 20) & 0b11111111);
19
+ }
20
+ else if (value < (2 ** 31) && value >= -(2 ** 31)) {
21
+ outEncodedData.push(0b11110000, value & 0b11111111, (value >> 8) & 0b11111111, (value >> 16) & 0b11111111, (value >> 24) & 0b11111111);
22
+ }
23
+ else {
24
+ throw new Error(`Input value must be within the range of an int31: between -(2^31) and 2^31 - 1`);
25
+ }
26
+ }
27
+ ////////////////////////////////////////////////////////////////////////////////////
28
+ // Decode signed integer
29
+ ////////////////////////////////////////////////////////////////////////////////////
30
+ export function decodeSignedInt32s(encodedData, outDecodedValues) {
31
+ for (let readIndex = 0; readIndex < encodedData.length;) {
32
+ const byte0 = encodedData[readIndex++];
33
+ if ((byte0 & 0b10000000) === 0) {
34
+ // 1 byte
35
+ let decodedValue = byte0;
36
+ if ((byte0 & 0b01000000) !== 0) {
37
+ decodedValue |= (-1 << 7);
38
+ }
39
+ outDecodedValues.push(decodedValue);
40
+ continue;
41
+ }
42
+ const byte1 = encodedData[readIndex++];
43
+ if ((byte0 & 0b01000000) === 0) {
44
+ // 2 bytes
45
+ let decodedValue = (byte0 & 0b00111111) |
46
+ (byte1 << 6);
47
+ if ((byte1 & 0b10000000) !== 0) {
48
+ decodedValue |= (-1 << 14);
49
+ }
50
+ outDecodedValues.push(decodedValue);
51
+ continue;
52
+ }
53
+ const byte2 = encodedData[readIndex++];
54
+ if ((byte0 & 0b00100000) === 0) {
55
+ // 3 bytes
56
+ let decodedValue = (byte0 & 0b00011111) |
57
+ (byte1 << 5) |
58
+ (byte2 << 13);
59
+ if ((byte2 & 0b10000000) !== 0) {
60
+ decodedValue |= (-1 << 21);
61
+ }
62
+ outDecodedValues.push(decodedValue);
63
+ continue;
64
+ }
65
+ const byte3 = encodedData[readIndex++];
66
+ if ((byte0 & 0b00010000) === 0) {
67
+ // 4 bytes
68
+ let decodedValue = (byte0 & 0b00001111) |
69
+ (byte1 << 4) |
70
+ (byte2 << 12) |
71
+ (byte3 << 20);
72
+ if ((byte3 & 0b10000000) !== 0) {
73
+ decodedValue |= (-1 << 28);
74
+ }
75
+ outDecodedValues.push(decodedValue);
76
+ continue;
77
+ }
78
+ const byte4 = encodedData[readIndex++];
79
+ if (byte0 === 0b11110000) {
80
+ // 5 bytes
81
+ let decodedValue = (byte1) |
82
+ (byte2 << 8) |
83
+ (byte3 << 16) |
84
+ (byte4 << 24);
85
+ outDecodedValues.push(decodedValue);
86
+ continue;
87
+ }
88
+ throw new Error(`Encountered a value that is encoded with more than 5 bytes (beyond int32 range).`);
89
+ }
90
+ }
91
+ ////////////////////////////////////////////////////////////////////////////////////
92
+ // Encode signed integer
93
+ ////////////////////////////////////////////////////////////////////////////////////
94
+ export function encodeUnsignedInt31(value, outEncodedData) {
95
+ if (value < (2 ** 7)) {
96
+ outEncodedData.push(value);
97
+ }
98
+ else if (value < (2 ** 14)) {
99
+ outEncodedData.push((value & 0b00111111) | 0b10000000, (value >>> 6) & 0b11111111);
100
+ }
101
+ else if (value < (2 ** 21)) {
102
+ outEncodedData.push((value & 0b00011111) | 0b11000000, (value >>> 5) & 0b11111111, (value >>> 13) & 0b11111111);
103
+ }
104
+ else if (value < (2 ** 28)) {
105
+ outEncodedData.push((value & 0b00001111) | 0b11100000, (value >>> 4) & 0b11111111, (value >>> 12) & 0b11111111, (value >>> 20) & 0b11111111);
106
+ }
107
+ else if (value < (2 ** 31)) {
108
+ outEncodedData.push(0b11110000, value & 0b11111111, (value >>> 8) & 0b11111111, (value >>> 16) & 0b11111111, (value >>> 24) & 0b11111111);
109
+ }
110
+ else {
111
+ throw new Error(`Input value must be within the range of an int31: between 0 and 2^31 - 1.`);
112
+ }
113
+ }
114
+ ////////////////////////////////////////////////////////////////////////////////////
115
+ // Decode unsigned integer
116
+ ////////////////////////////////////////////////////////////////////////////////////
117
+ export function decodeUnsignedInt31s(encodedData, outDecodedValues) {
118
+ for (let readIndex = 0; readIndex < encodedData.length;) {
119
+ const byte0 = encodedData[readIndex++];
120
+ if ((byte0 & 0b10000000) === 0) {
121
+ // 1 byte
122
+ let decodedValue = byte0;
123
+ outDecodedValues.push(decodedValue);
124
+ continue;
125
+ }
126
+ const byte1 = encodedData[readIndex++];
127
+ if ((byte0 & 0b01000000) === 0) {
128
+ // 2 bytes
129
+ let decodedValue = (byte0 & 0b00111111) |
130
+ (byte1 << 6);
131
+ outDecodedValues.push(decodedValue);
132
+ continue;
133
+ }
134
+ const byte2 = encodedData[readIndex++];
135
+ if ((byte0 & 0b00100000) === 0) {
136
+ // 3 bytes
137
+ let decodedValue = (byte0 & 0b00011111) |
138
+ (byte1 << 5) |
139
+ (byte2 << 13);
140
+ outDecodedValues.push(decodedValue);
141
+ continue;
142
+ }
143
+ const byte3 = encodedData[readIndex++];
144
+ if ((byte0 & 0b00010000) === 0) {
145
+ // 4 bytes
146
+ let decodedValue = (byte0 & 0b00001111) |
147
+ (byte1 << 4) |
148
+ (byte2 << 12) |
149
+ (byte3 << 20);
150
+ outDecodedValues.push(decodedValue);
151
+ continue;
152
+ }
153
+ const byte4 = encodedData[readIndex++];
154
+ if (byte0 === 0b11110000) {
155
+ // 5 bytes
156
+ let decodedValue = (byte1) |
157
+ (byte2 << 8) |
158
+ (byte3 << 16) |
159
+ (byte4 << 24);
160
+ outDecodedValues.push(decodedValue);
161
+ continue;
162
+ }
163
+ throw new Error(`Encountered a value that is encoded with more than 5 bytes (beyond uint31 range).`);
164
+ }
165
+ }
166
+ //# sourceMappingURL=VarInt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VarInt.js","sourceRoot":"","sources":["../../src/utilities/VarInt.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,wBAAwB;AACxB,oFAAoF;AACpF,MAAM,UAAU,iBAAiB,CAAC,KAAa,EAAE,cAAwB;IACxE,kCAAkC;IAElC,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE,CAAA;IAC3B,MAAM,QAAQ,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,OAAO,CAAA;IAE5C,IAAI,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACzB,cAAc,CAAC,IAAI,CAClB,KAAK,GAAG,UAAU,CAClB,CAAA;IACF,CAAC;SAAM,IAAI,QAAQ,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QACjC,cAAc,CAAC,IAAI,CAClB,CAAC,KAAK,GAAG,UAAU,CAAC,GAAG,UAAU,EACjC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,UAAU,CACzB,CA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AC;gBACZ,CAAC,KAAK,IAAI,EAAE,CAAC;gBACb,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;YAEd,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;YAEnC,SAAQ;QACT,CAAC;QAED,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC,CAAA;QAEtC,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;YAC1B,UAAU;YACV,IAAI,YAAY,GACf,CAAC,KAAK,CAAC;gBACP,CAAC,KAAK,IAAI,CAAC,CAAC;gBACZ,CAAC,KAAK,IAAI,EAAE,CAAC;gBACb,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;YAEd,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;YAEnC,SAAQ;QACT,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,mFAAmF,CAAC,CAAA;IACrG,CAAC;AACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Readable } from 'stream';
2
+ import { EventEmitter } from 'events';
3
+ import { ReadStream as FsReadStream } from 'fs';
4
+ export declare function createVirtualFileReadStreamForBuffer(buffer: Buffer, path?: string | Buffer): FsReadStream;
5
+ export declare class VirtualFileReadStream extends Readable {
6
+ private readonly buffer;
7
+ position: number;
8
+ bytesRead: number;
9
+ readonly path: string | Buffer;
10
+ pending: boolean;
11
+ readonly emitter: EventEmitter;
12
+ constructor(buffer: Buffer, virtualPath?: string | Buffer);
13
+ _read(size: number): void;
14
+ close(callback?: (err?: NodeJS.ErrnoException | null) => void): void;
15
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
16
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
17
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
18
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
19
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
20
+ }
@@ -0,0 +1,79 @@
1
+ import { Readable } from 'stream';
2
+ import { EventEmitter } from 'events';
3
+ import { ReadStream as FsReadStream } from 'fs';
4
+ export function createVirtualFileReadStreamForBuffer(buffer, path) {
5
+ const bufferReadStream = new VirtualFileReadStream(buffer, path);
6
+ const proxyStream = new Proxy(bufferReadStream, {
7
+ get(target, prop) {
8
+ if (prop === Symbol.toStringTag) {
9
+ return 'ReadStream';
10
+ }
11
+ return target[prop];
12
+ },
13
+ getPrototypeOf() {
14
+ return FsReadStream.prototype;
15
+ }
16
+ });
17
+ return proxyStream;
18
+ }
19
+ export class VirtualFileReadStream extends Readable {
20
+ buffer;
21
+ position;
22
+ bytesRead;
23
+ path;
24
+ pending;
25
+ emitter;
26
+ constructor(buffer, virtualPath) {
27
+ super({ autoDestroy: false });
28
+ this.buffer = buffer;
29
+ this.position = 0;
30
+ this.bytesRead = 0;
31
+ this.path = virtualPath || '';
32
+ this.pending = true;
33
+ this.emitter = new EventEmitter();
34
+ this.emitter.emit('open', 0);
35
+ this.pending = false;
36
+ this.emitter.emit('ready');
37
+ }
38
+ _read(size) {
39
+ if (this.position >= this.buffer.length) {
40
+ this.push(null);
41
+ this.emitter.emit('end');
42
+ this.emitter.emit('finish');
43
+ this.emitter.emit('close');
44
+ return;
45
+ }
46
+ const chunkSize = Math.min(size, this.buffer.length - this.position);
47
+ const chunk = this.buffer.subarray(this.position, this.position + chunkSize);
48
+ this.position += chunkSize;
49
+ this.bytesRead = this.position;
50
+ this.push(chunk);
51
+ }
52
+ close(callback) {
53
+ this.emitter.emit('close');
54
+ if (callback) {
55
+ callback(null);
56
+ }
57
+ }
58
+ addListener(event, listener) {
59
+ this.emitter.addListener(event, listener);
60
+ return this;
61
+ }
62
+ on(event, listener) {
63
+ this.emitter.on(event, listener);
64
+ return this;
65
+ }
66
+ once(event, listener) {
67
+ this.emitter.once(event, listener);
68
+ return this;
69
+ }
70
+ prependListener(event, listener) {
71
+ this.emitter.prependListener(event, listener);
72
+ return this;
73
+ }
74
+ prependOnceListener(event, listener) {
75
+ this.emitter.prependOnceListener(event, listener);
76
+ return this;
77
+ }
78
+ }
79
+ //# sourceMappingURL=VirtualFileReadStream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VirtualFileReadStream.js","sourceRoot":"","sources":["../../src/utilities/VirtualFileReadStream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,UAAU,IAAI,YAAY,EAAE,MAAM,IAAI,CAAA;AAE/C,MAAM,UAAU,oCAAoC,CAAC,MAAc,EAAE,IAAsB;IAC1F,MAAM,gBAAgB,GAAG,IAAI,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAEhE,MAAM,WAAW,GAAG,IAAI,KAAK,CAAe,gBAAgB,EAAE;QAC7D,GAAG,CAAC,MAAM,EAAE,IAAI;YACf,IAAI,IAAI,KAAK,MAAM,CAAC,WAAW,EAAE,CAAC;gBACjC,OAAO,YAAY,CAAA;YACpB,CAAC;YAED,OAAQ,MAAc,CAAC,IAAI,CAAC,CAAA;QAC7B,CAAC;QAED,cAAc;YACb,OAAO,YAAY,CAAC,SAAS,CAAA;QAC9B,CAAC;KACD,CAAC,CAAA;IAEF,OAAO,WAAW,CAAA;AACnB,CAAC;AAED,MAAM,OAAO,qBAAsB,SAAQ,QAAQ;IACjC,MAAM,CAAQ;IAE/B,QAAQ,CAAQ;IAChB,SAAS,CAAQ;IACR,IAAI,CAAiB;IAC9B,OAAO,CAAS;IACP,OAAO,CAAc;IAE9B,YAAY,MAAc,EAAE,WAA6B;QACxD,KAAK,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAA;QAE7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QAEpB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;QACjB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAA;QAClB,IAAI,CAAC,IAAI,GAAG,WAAW,IAAI,EAAE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AAC;IACF,CAAC;IAED,WAAW,CAAC,KAAsB,EAAE,QAAkC;QACrE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QAEzC,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,EAAE,CAAC,KAAsB,EAAE,QAAkC;QAC5D,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QAEhC,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,IAAI,CAAC,KAAsB,EAAE,QAAkC;QAC9D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QAElC,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,eAAe,CAAC,KAAsB,EAAE,QAAkC;QACzE,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QAE7C,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,mBAAmB,CAAC,KAAsB,EAAE,QAAkC;QAC7E,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QAEjD,OAAO,IAAI,CAAA;IACZ,CAAC;CACD"}
@@ -3,35 +3,19 @@ import { JSDOM, VirtualConsole } from 'jsdom';
3
3
  import { request } from 'gaxios';
4
4
  import { Logger } from './Logger.js';
5
5
  import { convertHtmlToText } from './Utilities.js';
6
+ import { getChromeOnWindowsHeaders } from './BrowserRequestHeaders.js';
6
7
  export async function fetchDocumentText(url) {
7
8
  const progressLogger = new Logger();
8
9
  progressLogger.start(`Fetching ${url}`);
10
+ const parsedUrl = new URL(url);
11
+ const origin = parsedUrl.origin;
9
12
  const response = await request({
10
13
  url,
11
14
  responseType: 'text',
12
- headers: {
13
- 'sec-ch-ua': `".Not/A)Brand";v="99", "Google Chrome";v="103", "Chromium";v="103"`,
14
- 'x-same-domain': '1',
15
- 'dnt': '1',
16
- 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
17
- 'sec-ch-ua-mobile': '?0',
18
- 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36',
19
- 'sec-ch-ua-arch': 'x86',
20
- 'sec-ch-ua-full-version': '103.0.5060.114',
21
- 'sec-ch-ua-platform-version': '10.0.0',
22
- 'sec-ch-ua-full-version-list': `".Not/A)Brand";v="99.0.0.0", "Google Chrome";v="103.0.5060.114", "Chromium";v="103.0.5060.114"`,
23
- 'sec-ch-ua-bitness': '64',
24
- 'sec-ch-ua-model': '',
25
- 'sec-ch-ua-platform': 'Windows',
26
- 'accept': '*/*',
27
- //'origin': 'https://www.google.com/',
28
- 'sec-fetch-site': 'same-origin',
29
- 'sec-fetch-mode': 'cors',
30
- 'sec-fetch-dest': 'empty',
31
- 'referer': 'https://www.google.com/',
32
- 'accept-encoding': 'gzip, deflate, br',
33
- 'accept-language': 'en-US,en;q=0.9',
34
- },
15
+ headers: getChromeOnWindowsHeaders({
16
+ origin: origin,
17
+ referrer: `${origin}/`
18
+ }),
35
19
  });
36
20
  progressLogger.start(`Parsing document body`);
37
21
  const doc = new JSDOM(response.data, {
@@ -1 +1 @@
1
- {"version":3,"file":"WebReader.js","sourceRoot":"","sources":["../../src/utilities/WebReader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,GAAW;IAClD,MAAM,cAAc,GAAG,IAAI,MAAM,EAAE,CAAA;IACnC,cAAc,CAAC,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E,CAAC,CAAA;IAEpE,cAAc,CAAC,GAAG,EAAE,CAAA;IAEpB,OAAO,IAAI,CAAA;AACZ,CAAC"}
@@ -1,4 +1,3 @@
1
- /// <reference path="../../src/typings/Fillers.d.ts" />
2
1
  import type * as Onnx from 'onnxruntime-node';
3
2
  import { RawAudio } from '../audio/AudioUtilities.js';
4
3
  import { OnnxExecutionProvider } from '../utilities/OnnxUtilities.js';
package/docs/API.md CHANGED
@@ -175,6 +175,30 @@ Translates speech audio directly to a transcript in a different language (only E
175
175
  }
176
176
  ```
177
177
 
178
+ ## Text-to-text translation
179
+
180
+ ### `translateText(input, options)`
181
+
182
+ Translates text to text.
183
+
184
+ * `input`: string
185
+ * `options`: text translation options object
186
+
187
+ #### Returns (via promise):
188
+ ```ts
189
+ {
190
+ text: string
191
+ translatedText: string
192
+
193
+ translationPairs: TranslationPair[]
194
+
195
+ sourceLanguage: string
196
+ targetLanguage: string
197
+ }
198
+ ```
199
+
200
+ `translationPairs` is an array of objects corresponding to individual segments of the text and their translations.
201
+
178
202
  ## Speech-to-translated-transcript alignment
179
203
 
180
204
  ### `alignTranslation(input, translatedTranscript, options)`
package/docs/Engines.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  **Offline**:
7
7
 
8
- * [VITS](https://github.com/jaywalnut310/vits) (`vits`): end-to-end neural speech synthesis architecture. Available models were trained by Michael Hansen as part of his [Piper speech synthesis system](https://github.com/rhasspy/piper). Currently, there are 117 voices, in a range of languages, including English (US, UK), Spanish (ES, MX), Portuguese (PT, BR), Italian, French, German, Dutch (NL, BE), Swedish, Norwegian, Danish, Finnish, Polish, Greek, Romanian, Serbian, Czech, Hungarian, Slovak, Slovenian, Turkish, Arabic, Farsi, Russian, Ukrainian, Catalan, Luxembourgish, Icelandic, Swahili, Kazakh, Georgian, Nepali, Vietnamese and Chinese. You can listen to audio samples of all voices and languages in [Piper's samples page](https://rhasspy.github.io/piper-samples/)
8
+ * [VITS](https://github.com/jaywalnut310/vits) (`vits`): end-to-end neural speech synthesis architecture. Available models were trained by Michael Hansen as part of his [Piper speech synthesis system](https://github.com/rhasspy/piper). Currently, there are 123 voices, in a range of languages, including English (US, UK), Spanish (ES, MX), Portuguese (PT, BR), Italian, French, German, Dutch (NL, BE), Swedish, Norwegian, Danish, Finnish, Polish, Greek, Romanian, Serbian, Czech, Hungarian, Slovak, Slovenian, Turkish, Arabic, Farsi, Russian, Ukrainian, Catalan, Luxembourgish, Icelandic, Swahili, Kazakh, Georgian, Nepali, Vietnamese and Chinese. You can listen to audio samples of all voices and languages in [Piper's samples page](https://rhasspy.github.io/piper-samples/)
9
9
  * [SVOX Pico](https://github.com/naggety/picotts) (`pico`): a legacy diphone-based synthesis engine. Supports English (US, UK), Spanish, Italian, French, and German
10
10
  * [Flite](https://github.com/festvox/flite) (`flite`): a legacy diphone-based synthesis engine. Supports English (US, Scottish), and several Indic languages: Hindi, Bengali, Marathi, Telugu, Tamil, Gujarati, Kannada and Punjabi
11
11
  * [eSpeak-NG](https://github.com/espeak-ng/espeak-ng/) (`espeak`): a lightweight "robot" sounding formant-based synthesizer. Supports 100+ languages. Used internally for speech alignment, phonemization, and other internal tasks
@@ -58,7 +58,7 @@ These are commercial services that require a subscription and an API key to use:
58
58
  * [Google Cloud](https://cloud.google.com/speech-to-text) (`google-cloud`)
59
59
  * [Azure Cognitive Services](https://azure.microsoft.com/en-us/products/ai-services/speech-to-text/) (`microsoft-azure`)
60
60
  * [Amazon Transcribe](https://aws.amazon.com/transcribe/) (`amazon-transcribe`)
61
- * [OpenAI Cloud Platform](https://platform.openai.com/) (`openai-cloud`): runs the `large-v2` Whisper model on the cloud
61
+ * [OpenAI Cloud Platform](https://platform.openai.com/) (`openai-cloud`): runs the `large-v2` Whisper model on the cloud. Allows setting a custom provider, like [Groq](https://console.groq.com/docs/api-reference#audio), to request from any OpenAI-compatible provider
62
62
 
63
63
  ## Speech-to-transcript alignment
64
64
 
@@ -68,7 +68,6 @@ These engines' goal is to match (or "align") a given spoken recording with a giv
68
68
  * Dynamic Time Warping with Recognition Assist (`dtw-ra`): recognition is applied to the audio (any recognition engine can be used), then both the ground-truth transcript and the recognized transcript are synthesized using eSpeak. Then, the best mapping is found between the two synthesized waveforms, using the DTW algorithm, and the result is remapped back to the original audio using the timing information produced by the recognizer
69
69
  * Whisper-based alignment (`whisper`): transcript is first tokenized, then, its tokens are decoded, in order, with a guided approach, using the Whisper model. The resulting token timestamps are then used to derive the timing for each word
70
70
 
71
-
72
71
  ## Speech-to-text translation
73
72
 
74
73
  **Offline**:
@@ -78,6 +77,12 @@ These engines' goal is to match (or "align") a given spoken recording with a giv
78
77
  **Cloud services**:
79
78
  * [OpenAI Cloud Platform](https://platform.openai.com/) (`openai-cloud`): runs the `large-v2` Whisper model on the cloud. Only supports English as target
80
79
 
80
+ ## Text-to-text translation
81
+
82
+ **Cloud services (unofficial)**:
83
+
84
+ * Google Translate (`google-translate`): uses the [Google Translate mobile web UI](https://translate.google.com/m) to translate text from and to any one of its supported languages.
85
+
81
86
  ## Speech-to-translated-transcript alignment
82
87
 
83
88
  The goal here is to match (or "align") a given spoken recording in one language, with a given translated transcript in a different language, as closely as possible.
package/docs/Options.md CHANGED
@@ -141,24 +141,24 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
141
141
  * `sourceSeparation`: prefix to provide options for source separation when `isolate` is set to `true`. Options detailed in section for source separation
142
142
 
143
143
  **Whisper**:
144
- * `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` (**Note**: large models aren't yet supported by `onnxruntime-node` due to their size). Defaults to `tiny` or `tiny.en`
144
+ * `whisper.model`: selects which Whisper model to use. Can be `tiny`, `tiny.en`, `base`, `base.en`, `small`, `small.en`, `medium`, `medium.en` or `large-v3-turbo`. Defaults to `tiny` or `tiny.en`
145
145
  * `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`
146
146
  * `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
147
147
  * `whisper.topCandidateCount`: the number of top candidate tokens to consider. Defaults to `5`
148
- * `whisper.punctuationThreshold`: the minimal probability for a punctuation token, included in the top candidates, to be chosen unconditionally. A lower threshold encourages the model to output more punctuation symbols. Defaults to `0.2`
149
- * `whisper.autoPromptParts`: use previous part's recognized text as the prompt for the next part. Disabling this may help to prevent repetition carrying over between parts, in some cases. Defaults to `true`
148
+ * `whisper.punctuationThreshold`: the minimal probability for a punctuation token, included in the top candidates, to be chosen unconditionally. A lower threshold encourages the model to output more punctuation characters. Defaults to `0.2`
149
+ * `whisper.autoPromptParts`: use previous part's recognized text as the prompt for the next part. Disabling this may help to prevent repetition carrying over between parts, in some cases. Defaults to `true` (**Note**: currently always disabled for `large-v3-turbo` model due to an apparent issue with corrupt output when prompted)
150
150
  * `whisper.maxTokensPerPart`: maximum number of tokens to decode for each audio part. Defaults to `250`
151
151
  * `whisper.suppressRepetition`: attempt to suppress decoding of repeating token patterns. Defaults to `true`
152
152
  * `whisper.repetitionThreshold`: minimal repetition / compressibility score to cause a part not to be auto-prompted to the next part. Defaults to `2.4`
153
153
  * `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`
154
- * `whisper.encoderProvider`: identifier for the ONNX execution provider to use with the encoder model. Can be `cpu` or `dml` ([DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration - Windows only). In general, GPU-based encoding should be significantly faster. Defaults to `cpu`, or `dml` if available
155
- * `whisper.decoderProvider`: identifier for the ONNX execution provider to use with the decoder model. Can be `cpu` or `dml` (Windows only). 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`
154
+ * `whisper.encoderProvider`: identifier for the ONNX execution provider to use with the encoder model. Can be `cpu`, `dml` ([DirectML](https://microsoft.github.io/DirectML/)-based GPU acceleration - Windows only) or `cuda` (Linux only). In general, GPU-based encoding should be significantly faster. Defaults to `cpu`, or `dml` if available
155
+ * `whisper.decoderProvider`: identifier for the ONNX execution provider to use with the decoder model. Can be `cpu`, `dml` (Windows only) or `cuda` (Linux only). 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`)
156
156
  * `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
157
157
 
158
158
  **Whisper.cpp**:
159
- * `whisperCpp.model`: selects which `whisper.cpp` 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`. These quantized models are also supported: `tiny-q5_1`, `tiny.en-q5_1`, `tiny.en-q8_0`,`base-q5_1`, `base.en-q5_1`, `small-q5_1`, `small.en-q5_1`, `medium-q5_0`, `medium.en-q5_0`, `large-v2-q5_0`, `large-v3-q5_0`. Defaults to `base` or `base.en`
160
- * `whisperCpp.executablePath`: custom `whisper.cpp` executable path (currently required for macOS)
161
- * `whisperCpp.build`: type of `whisper.cpp` build to use. Can be set `cpu`, `cublas-11.8.0`, `cublas-12.4.0`. By default, builds are auto-selected and downloaded for Windows x64 (`cpu`, `cublas-11.8.0`, `cublas-12.4.0`) and Linux x64 (`cpu`). Using other builds requires providing a custom `executablePath`
159
+ * `whisperCpp.model`: selects which `whisper.cpp` 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`. These quantized models are also supported: `tiny-q5_1`, `tiny.en-q5_1`, `tiny.en-q8_0`,`base-q5_1`, `base.en-q5_1`, `small-q5_1`, `small.en-q5_1`, `medium-q5_0`, `medium.en-q5_0`, `large-v2-q5_0`, `large-v3-q5_0`, `large-v3-turbo`, `large-v3-turbo-q5_0`. Defaults to `base` or `base.en`
160
+ * `whisperCpp.executablePath`: a path to a custom `whisper.cpp` `main` executable (currently required for macOS)
161
+ * `whisperCpp.build`: type of `whisper.cpp` build to use. Can be set to `cpu` or `cublas-12.4.0`. By default, builds are auto-selected and downloaded for Windows x64 (`cpu`, `cublas-12.4.0`) and Linux x64 (`cpu`). Using other builds requires providing a custom `executablePath`
162
162
  * `whisperCpp.threadCount`: number of threads to use, defaults to `4`
163
163
  * `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)
164
164
  * `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`
@@ -166,7 +166,7 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
166
166
  * `whisperCpp.beamCount`: the number of decoding paths to use during beam search. Defaults to `5`
167
167
  * `whisperCpp.repetitionThreshold`: minimal repetition / compressibility score to cause a decoded segment to be discarded. Defaults to `2.4`
168
168
  * `whisperCpp.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
169
- * `whisperCpp.enableDTW`: enable experimental `whisper.cpp` internal DTW-based token alignment to be used to derive timestamps. Defaults to `false` (recommended for now)
169
+ * `whisperCpp.enableDTW`: enable `whisper.cpp`'s own experimental DTW-based token alignment to be used to derive timestamps. Defaults to `false` (highly recommended)
170
170
  * `whisperCpp.verbose`: show all CLI messages during execution. Defaults to `false`
171
171
 
172
172
  **Vosk**:
@@ -194,9 +194,9 @@ Applies to CLI operation: `transcribe`, API method: `recognize`
194
194
 
195
195
  **OpenAI Cloud**:
196
196
  * `openAICloud.apiKey`: API key (required)
197
- * `openAICloud.model`: model to use. Can only be `whisper-1`
197
+ * `openAICloud.model`: model to use. When using the default provider (OpenAI), can only be `whisper-1`. For a custom provider, like Groq, see its documentation
198
198
  * `openAICloud.organization`: organization identifier. Optional
199
- * `openAICloud.baseURL`: override the default base URL used by the API. Optional
199
+ * `openAICloud.baseURL`: override the default base URL used by the API. For example, set `https://api.groq.com/openai/v1` to use Groq's OpenAI compatible Whisper API instead. Optional
200
200
  * `openAICloud.temperature`: temperature. Choosing `0` uses a dynamic temperature approach. Defaults to `0`
201
201
  * `openAICloud.prompt`: initial prompt for the model. Optional
202
202
  * `openAICloud.timeout`: request timeout. Optional
@@ -265,6 +265,15 @@ Applies to CLI operation: `translate-speech`, API method: `translateSpeech`
265
265
 
266
266
  * `openAICloud`: prefix to provide options for OpenAI cloud. Same options as detailed in the recognition section above
267
267
 
268
+ ## Text-to-text translation
269
+
270
+ Applies to CLI operation: `translate-text`, API method: `translateText`
271
+
272
+ * `engine`: only `google-translate` supported
273
+ * `sourceLanguage`: the source language code for the input text. Auto-detected if not set
274
+ * `targetLanguage`: the target language code for the output text. Required
275
+ * `languageDetection`: language detection options. Optional
276
+
268
277
  ## Speech-to-translated-transcript alignment
269
278
 
270
279
  Applies to CLI operation: `align-translation`, API method: `alignTranslation`
package/docs/Tasklist.md CHANGED
@@ -2,11 +2,6 @@
2
2
 
3
3
  ## Bugs
4
4
 
5
- ### Alignment / DTW-RA
6
-
7
- * In DTW-RA, a recognized transcript including something like "Question 2.What does Juan", where "2.What" has a point in the middle, is breaking playback of the timeline
8
-
9
- ### Synthesis
10
5
 
11
6
  ### eSpeak
12
7
 
@@ -24,6 +19,7 @@
24
19
  * `espeak-ng`: 'Oh dear!”' is read as "oh dear exclamation mark", because of the special quote character following the exclamation mark
25
20
  * `espeak-ng`: [Marker right after sentence end is not reported as an event](https://github.com/espeak-ng/espeak-ng/issues/920)
26
21
  * `espeak-ng`: On Japanese text, it says "Chinese character" or "Japanese character" for characters it doesn't know
22
+ * `espeak-ng`: Broken markers on the Korean voice
27
23
  * `wtf_wikipedia` Sometimes fails on `getResult.js` without throwing a humanly readable error
28
24
  * `wtf_wikipedia` Sometimes captures markup like `.svg` etc.
29
25
  * `msspeech`: Initialization fails on Chinese and Japanese voices (but not Korean)
@@ -255,15 +251,7 @@
255
251
  * Allow `dtw` mode work with more speech synthesizers to produce its reference
256
252
  * Predict timing for individual letters (graphemes) based on phoneme timestamps (especially useful for Chinese and Japanese)
257
253
 
258
- ### Translation
259
- * Add text-to-text translation with cloud translation APIs like Google Translate or DeepL, or offline models like OpenNMT or NLLB-200
260
-
261
- ### Translation alignment
262
- * Perform word-level alignment of text-to-text translations from and to any language (not just English) using methods like multilingual embeddings, or specialized models, and then use the text-based alignment to align speech in any recognized language, to its translated transcript in any language supported by the text-to-text alignment approach
263
-
264
- ### Speech-to-text translation
265
254
 
266
- * Hybrid approach: recognize speech in its native language using any recognition model, then translate the resulting transcript using a text-to-text translation engine, and then align the translated transcript to the original one using text-to-text alignment, and map back to the original speech using the recognition timestamps, to get word-level alignment for the translated transcript
267
255
 
268
256
  ## Possible new engines or platforms
269
257
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echogarden",
3
- "version": "1.5.0",
3
+ "version": "1.6.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
6
  "license": "GPL-3.0",
@@ -55,8 +55,8 @@
55
55
  "echogarden": "./dist/cli/CLILauncher.js"
56
56
  },
57
57
  "dependencies": {
58
- "@aws-sdk/client-polly": "^3.583.0",
59
- "@aws-sdk/client-transcribe-streaming": "^3.583.0",
58
+ "@aws-sdk/client-polly": "^3.664.0",
59
+ "@aws-sdk/client-transcribe-streaming": "^3.664.0",
60
60
  "@echogarden/espeak-ng-emscripten": "^0.1.2",
61
61
  "@echogarden/fasttext-wasm": "^0.1.0",
62
62
  "@echogarden/flite-wasi": "^0.1.1",
@@ -74,42 +74,38 @@
74
74
  "chalk": "^5.3.0",
75
75
  "cldr-segmentation": "^2.2.1",
76
76
  "command-exists": "^1.2.9",
77
- "compromise": "^14.13.0",
77
+ "compromise": "^14.14.0",
78
78
  "fs-extra": "^11.2.0",
79
- "gaxios": "^6.6.0",
79
+ "gaxios": "^6.7.1",
80
80
  "graceful-fs": "^4.2.11",
81
81
  "html-escaper": "^3.0.3",
82
82
  "html-to-text": "^9.0.5",
83
83
  "import-meta-resolve": "^4.1.0",
84
- "jieba-wasm": "^1.0.0",
85
- "jsdom": "^24.1.0",
84
+ "jieba-wasm": "^2.1.1",
85
+ "jsdom": "^25.0.1",
86
86
  "json5": "^2.2.3",
87
87
  "kuromoji": "^0.1.2",
88
- "microsoft-cognitiveservices-speech-sdk": "^1.36.0",
88
+ "microsoft-cognitiveservices-speech-sdk": "^1.40.0",
89
89
  "moving-median": "^1.0.0",
90
90
  "msgpack-lite": "^0.1.26",
91
- "onnxruntime-node": "^1.18.0",
92
- "openai": "^4.47.1",
93
- "sam-js": "^0.2.1",
91
+ "onnxruntime-node": "^1.19.2",
92
+ "openai": "^4.67.1",
93
+ "sam-js": "^0.3.1",
94
94
  "strip-ansi": "^7.1.0",
95
- "tar": "^7.1.0",
96
- "tiktoken": "^1.0.15",
95
+ "tar": "^7.4.3",
96
+ "tiktoken": "^1.0.16",
97
97
  "tinyld": "^1.3.4",
98
- "ws": "^8.17.0",
99
- "wtf_wikipedia": "^10.3.1"
98
+ "ws": "^8.18.0",
99
+ "wtf_wikipedia": "^10.3.2"
100
100
  },
101
101
  "peerDependencies": {
102
102
  "@echogarden/vosk": "^0.3.39-patched.1",
103
- "speaker": "^0.5.5",
104
103
  "winax": "^3.4.2"
105
104
  },
106
105
  "peerDependenciesMeta": {
107
106
  "@echogarden/vosk": {
108
107
  "optional": true
109
108
  },
110
- "speaker": {
111
- "optional": true
112
- },
113
109
  "winax": {
114
110
  "optional": true
115
111
  }
@@ -118,13 +114,13 @@
118
114
  "@types/buffer-split": "^1.0.2",
119
115
  "@types/fs-extra": "^11.0.4",
120
116
  "@types/graceful-fs": "^4.1.9",
121
- "@types/jsdom": "^21.1.6",
117
+ "@types/jsdom": "^21.1.7",
122
118
  "@types/msgpack-lite": "^0.1.11",
123
- "@types/node": "^20.12.12",
119
+ "@types/node": "^22.7.4",
124
120
  "@types/recursive-readdir": "^2.2.4",
125
121
  "@types/tar": "^6.1.13",
126
- "@types/ws": "^8.5.10",
127
- "ts-json-schema-generator": "^2.2.0",
128
- "typescript": "^5.4.5"
122
+ "@types/ws": "^8.5.12",
123
+ "ts-json-schema-generator": "^2.3.0",
124
+ "typescript": "^5.6.2"
129
125
  }
130
126
  }