echogarden 2.10.1 → 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.
Files changed (595) hide show
  1. package/LICENSE.MIT.md +7 -0
  2. package/README.md +9 -1
  3. package/data/lexicons/heteronyms.en.json +44 -10
  4. package/data/lexicons/words.en.json +726 -22
  5. package/data/schemas/options.json +91 -153
  6. package/dist/alignment/DTWMfccSequenceAlignment.d.ts +1 -0
  7. package/dist/alignment/DTWMfccSequenceAlignment.d.ts.map +1 -0
  8. package/dist/alignment/DTWMfccSequenceAlignment.js.map +1 -1
  9. package/dist/alignment/DTWSequenceAlignment.d.ts +1 -0
  10. package/dist/alignment/DTWSequenceAlignment.d.ts.map +1 -0
  11. package/dist/alignment/DTWSequenceAlignmentWindowed.d.ts +1 -0
  12. package/dist/alignment/DTWSequenceAlignmentWindowed.d.ts.map +1 -0
  13. package/dist/alignment/LevenshteinSequenceAlignment.d.ts +1 -0
  14. package/dist/alignment/LevenshteinSequenceAlignment.d.ts.map +1 -0
  15. package/dist/alignment/SemanticTextAlignment.d.ts +5 -2
  16. package/dist/alignment/SemanticTextAlignment.d.ts.map +1 -0
  17. package/dist/alignment/SemanticTextAlignment.js +7 -7
  18. package/dist/alignment/SemanticTextAlignment.js.map +1 -1
  19. package/dist/alignment/SpeechAlignment.d.ts +10 -10
  20. package/dist/alignment/SpeechAlignment.d.ts.map +1 -0
  21. package/dist/alignment/SpeechAlignment.js +23 -96
  22. package/dist/alignment/SpeechAlignment.js.map +1 -1
  23. package/dist/api/API.d.ts +1 -0
  24. package/dist/api/API.d.ts.map +1 -0
  25. package/dist/api/APIOptions.d.ts +2 -1
  26. package/dist/api/APIOptions.d.ts.map +1 -0
  27. package/dist/api/Alignment.d.ts +9 -6
  28. package/dist/api/Alignment.d.ts.map +1 -0
  29. package/dist/api/Alignment.js +31 -40
  30. package/dist/api/Alignment.js.map +1 -1
  31. package/dist/api/Common.d.ts +8 -0
  32. package/dist/api/Common.d.ts.map +1 -0
  33. package/dist/api/Common.js.map +1 -1
  34. package/dist/api/Denoising.d.ts +6 -2
  35. package/dist/api/Denoising.d.ts.map +1 -0
  36. package/dist/api/Denoising.js +15 -15
  37. package/dist/api/Denoising.js.map +1 -1
  38. package/dist/api/GlobalOptions.d.ts +3 -8
  39. package/dist/api/GlobalOptions.d.ts.map +1 -0
  40. package/dist/api/GlobalOptions.js +2 -13
  41. package/dist/api/GlobalOptions.js.map +1 -1
  42. package/dist/api/LanguageDetectionCommon.d.ts +1 -0
  43. package/dist/api/LanguageDetectionCommon.d.ts.map +1 -0
  44. package/dist/api/Recognition.d.ts +12 -12
  45. package/dist/api/Recognition.d.ts.map +1 -0
  46. package/dist/api/Recognition.js +32 -82
  47. package/dist/api/Recognition.js.map +1 -1
  48. package/dist/api/SourceSeparation.d.ts +8 -2
  49. package/dist/api/SourceSeparation.d.ts.map +1 -0
  50. package/dist/api/SourceSeparation.js +12 -10
  51. package/dist/api/SourceSeparation.js.map +1 -1
  52. package/dist/api/SpeechLanguageDetection.d.ts +12 -7
  53. package/dist/api/SpeechLanguageDetection.d.ts.map +1 -0
  54. package/dist/api/SpeechLanguageDetection.js +37 -30
  55. package/dist/api/SpeechLanguageDetection.js.map +1 -1
  56. package/dist/api/SpeechSearch.d.ts +5 -1
  57. package/dist/api/SpeechSearch.d.ts.map +1 -0
  58. package/dist/api/SpeechSearch.js.map +1 -1
  59. package/dist/api/SpeechTranslation.d.ts +11 -6
  60. package/dist/api/SpeechTranslation.d.ts.map +1 -0
  61. package/dist/api/SpeechTranslation.js +28 -26
  62. package/dist/api/SpeechTranslation.js.map +1 -1
  63. package/dist/api/Synthesis.d.ts +14 -8
  64. package/dist/api/Synthesis.d.ts.map +1 -0
  65. package/dist/api/Synthesis.js +67 -89
  66. package/dist/api/Synthesis.js.map +1 -1
  67. package/dist/api/TextLanguageDetection.d.ts +5 -2
  68. package/dist/api/TextLanguageDetection.d.ts.map +1 -0
  69. package/dist/api/TextLanguageDetection.js +4 -7
  70. package/dist/api/TextLanguageDetection.js.map +1 -1
  71. package/dist/api/TextTranslation.d.ts +5 -2
  72. package/dist/api/TextTranslation.d.ts.map +1 -0
  73. package/dist/api/TextTranslation.js +13 -24
  74. package/dist/api/TextTranslation.js.map +1 -1
  75. package/dist/api/TimelineTranslationAlignment.d.ts +7 -3
  76. package/dist/api/TimelineTranslationAlignment.d.ts.map +1 -0
  77. package/dist/api/TimelineTranslationAlignment.js +20 -11
  78. package/dist/api/TimelineTranslationAlignment.js.map +1 -1
  79. package/dist/api/TranscriptAndTranslationAlignment.d.ts +7 -4
  80. package/dist/api/TranscriptAndTranslationAlignment.d.ts.map +1 -0
  81. package/dist/api/TranscriptAndTranslationAlignment.js +11 -12
  82. package/dist/api/TranscriptAndTranslationAlignment.js.map +1 -1
  83. package/dist/api/TranslationAlignment.d.ts +7 -4
  84. package/dist/api/TranslationAlignment.d.ts.map +1 -0
  85. package/dist/api/TranslationAlignment.js +20 -21
  86. package/dist/api/TranslationAlignment.js.map +1 -1
  87. package/dist/api/VoiceActivityDetection.d.ts +10 -8
  88. package/dist/api/VoiceActivityDetection.d.ts.map +1 -0
  89. package/dist/api/VoiceActivityDetection.js +20 -43
  90. package/dist/api/VoiceActivityDetection.js.map +1 -1
  91. package/dist/audio/AudioBufferConversion.d.ts +1 -0
  92. package/dist/audio/AudioBufferConversion.d.ts.map +1 -0
  93. package/dist/audio/AudioBufferConversion.js.map +1 -1
  94. package/dist/audio/AudioPlayer.d.ts +2 -3
  95. package/dist/audio/AudioPlayer.d.ts.map +1 -0
  96. package/dist/audio/AudioPlayer.js +3 -188
  97. package/dist/audio/AudioPlayer.js.map +1 -1
  98. package/dist/audio/AudioUtilities.d.ts +3 -1
  99. package/dist/audio/AudioUtilities.d.ts.map +1 -0
  100. package/dist/audio/AudioUtilities.js +2 -2
  101. package/dist/audio/AudioUtilities.js.map +1 -1
  102. package/dist/build-tools/MakeTarballsForInstalledPackages.d.ts +1 -0
  103. package/dist/build-tools/MakeTarballsForInstalledPackages.d.ts.map +1 -0
  104. package/dist/build-tools/MakeTarballsForInstalledPackages.js +3 -3
  105. package/dist/build-tools/MakeTarballsForInstalledPackages.js.map +1 -1
  106. package/dist/cli/CLI.d.ts +1 -0
  107. package/dist/cli/CLI.d.ts.map +1 -0
  108. package/dist/cli/CLI.js +139 -92
  109. package/dist/cli/CLI.js.map +1 -1
  110. package/dist/cli/CLIConfigFile.d.ts +1 -0
  111. package/dist/cli/CLIConfigFile.d.ts.map +1 -0
  112. package/dist/cli/CLILauncher.d.ts +1 -0
  113. package/dist/cli/CLILauncher.d.ts.map +1 -0
  114. package/dist/cli/CLIOptions.d.ts +1 -0
  115. package/dist/cli/CLIOptions.d.ts.map +1 -0
  116. package/dist/cli/CLIOptionsSchema.d.ts +1 -0
  117. package/dist/cli/CLIOptionsSchema.d.ts.map +1 -0
  118. package/dist/cli/CLIParser.d.ts +1 -0
  119. package/dist/cli/CLIParser.d.ts.map +1 -0
  120. package/dist/cli/CLIStarter.d.ts +1 -0
  121. package/dist/cli/CLIStarter.d.ts.map +1 -0
  122. package/dist/codecs/FFMpegTranscoder.d.ts +5 -3
  123. package/dist/codecs/FFMpegTranscoder.d.ts.map +1 -0
  124. package/dist/codecs/FFMpegTranscoder.js +16 -14
  125. package/dist/codecs/FFMpegTranscoder.js.map +1 -1
  126. package/dist/codecs/TIMITCodec.d.ts +1 -0
  127. package/dist/codecs/TIMITCodec.d.ts.map +1 -0
  128. package/dist/data-structures/DynamicTypedArray.d.ts +1 -0
  129. package/dist/data-structures/DynamicTypedArray.d.ts.map +1 -0
  130. package/dist/data-structures/DynamicTypedArray.js.map +1 -1
  131. package/dist/data-structures/Queue.d.ts +1 -0
  132. package/dist/data-structures/Queue.d.ts.map +1 -0
  133. package/dist/data-structures/WindowedList.d.ts +1 -0
  134. package/dist/data-structures/WindowedList.d.ts.map +1 -0
  135. package/dist/data-structures/WindowedList.js.map +1 -1
  136. package/dist/denoising/NSNet2.d.ts +4 -2
  137. package/dist/denoising/NSNet2.d.ts.map +1 -0
  138. package/dist/denoising/NSNet2.js +4 -4
  139. package/dist/denoising/NSNet2.js.map +1 -1
  140. package/dist/denoising/RNNoise.d.ts +3 -1
  141. package/dist/denoising/RNNoise.d.ts.map +1 -0
  142. package/dist/denoising/RNNoise.js +10 -6
  143. package/dist/denoising/RNNoise.js.map +1 -1
  144. package/dist/dsp/BiquadFilter.d.ts +1 -0
  145. package/dist/dsp/BiquadFilter.d.ts.map +1 -0
  146. package/dist/dsp/DecayingPeakEstimator.d.ts +1 -0
  147. package/dist/dsp/DecayingPeakEstimator.d.ts.map +1 -0
  148. package/dist/dsp/DecayingPeakEstimator.js.map +1 -1
  149. package/dist/dsp/FFT.d.ts +1 -0
  150. package/dist/dsp/FFT.d.ts.map +1 -0
  151. package/dist/dsp/FFT.js +2 -1
  152. package/dist/dsp/FFT.js.map +1 -1
  153. package/dist/dsp/KWeightingFilter.d.ts +1 -0
  154. package/dist/dsp/KWeightingFilter.d.ts.map +1 -0
  155. package/dist/dsp/KWeightingFilter.js.map +1 -1
  156. package/dist/dsp/LoudnessEstimator.d.ts +1 -0
  157. package/dist/dsp/LoudnessEstimator.d.ts.map +1 -0
  158. package/dist/dsp/LoudnessEstimator.js.map +1 -1
  159. package/dist/dsp/MFCC.d.ts +4 -2
  160. package/dist/dsp/MFCC.d.ts.map +1 -0
  161. package/dist/dsp/MFCC.js +4 -4
  162. package/dist/dsp/MFCC.js.map +1 -1
  163. package/dist/dsp/MelSpectrogram.d.ts +11 -8
  164. package/dist/dsp/MelSpectrogram.d.ts.map +1 -0
  165. package/dist/dsp/MelSpectrogram.js +31 -34
  166. package/dist/dsp/MelSpectrogram.js.map +1 -1
  167. package/dist/dsp/Rubberband.d.ts +1 -0
  168. package/dist/dsp/Rubberband.d.ts.map +1 -0
  169. package/dist/dsp/Rubberband.js +8 -3
  170. package/dist/dsp/Rubberband.js.map +1 -1
  171. package/dist/dsp/Sonic.d.ts +1 -0
  172. package/dist/dsp/Sonic.d.ts.map +1 -0
  173. package/dist/dsp/Sonic.js +1 -1
  174. package/dist/dsp/Sonic.js.map +1 -1
  175. package/dist/dsp/SpeexResampler.d.ts +1 -0
  176. package/dist/dsp/SpeexResampler.d.ts.map +1 -0
  177. package/dist/dsp/SpeexResampler.js +1 -1
  178. package/dist/dsp/SpeexResampler.js.map +1 -1
  179. package/dist/encodings/Ascii.d.ts +2 -1
  180. package/dist/encodings/Ascii.d.ts.map +1 -0
  181. package/dist/encodings/Base64.d.ts +1 -0
  182. package/dist/encodings/Base64.d.ts.map +1 -0
  183. package/dist/encodings/Base64.js.map +1 -1
  184. package/dist/encodings/Hex.d.ts +1 -0
  185. package/dist/encodings/Hex.d.ts.map +1 -0
  186. package/dist/encodings/HtmlEscape.d.ts +1 -0
  187. package/dist/encodings/HtmlEscape.d.ts.map +1 -0
  188. package/dist/encodings/LEB128.d.ts +1 -0
  189. package/dist/encodings/LEB128.d.ts.map +1 -0
  190. package/dist/encodings/TextEncodingsCommon.d.ts +1 -0
  191. package/dist/encodings/TextEncodingsCommon.d.ts.map +1 -0
  192. package/dist/encodings/Utf16.d.ts +1 -0
  193. package/dist/encodings/Utf16.d.ts.map +1 -0
  194. package/dist/encodings/Utf32.d.ts +1 -0
  195. package/dist/encodings/Utf32.d.ts.map +1 -0
  196. package/dist/encodings/Utf8.d.ts +1 -0
  197. package/dist/encodings/Utf8.d.ts.map +1 -0
  198. package/dist/math/MedianFilter.d.ts +1 -0
  199. package/dist/math/MedianFilter.d.ts.map +1 -0
  200. package/dist/math/VectorMath.d.ts +2 -0
  201. package/dist/math/VectorMath.d.ts.map +1 -0
  202. package/dist/math/VectorMath.js +9 -5
  203. package/dist/math/VectorMath.js.map +1 -1
  204. package/dist/nlp/ChineseSegmentation.d.ts +2 -1
  205. package/dist/nlp/ChineseSegmentation.d.ts.map +1 -0
  206. package/dist/nlp/EspeakPhonemizer.d.ts +2 -1
  207. package/dist/nlp/EspeakPhonemizer.d.ts.map +1 -0
  208. package/dist/nlp/EspeakPhonemizer.js +2 -2
  209. package/dist/nlp/EspeakPhonemizer.js.map +1 -1
  210. package/dist/nlp/IPA.d.ts +3 -2
  211. package/dist/nlp/IPA.d.ts.map +1 -0
  212. package/dist/nlp/JapaneseSegmentation.d.ts +1 -0
  213. package/dist/nlp/JapaneseSegmentation.d.ts.map +1 -0
  214. package/dist/nlp/Lexicon.d.ts +1 -0
  215. package/dist/nlp/Lexicon.d.ts.map +1 -0
  216. package/dist/nlp/PhoneConversion.d.ts +1 -0
  217. package/dist/nlp/PhoneConversion.d.ts.map +1 -0
  218. package/dist/nlp/Segmentation.d.ts +2 -1
  219. package/dist/nlp/Segmentation.d.ts.map +1 -0
  220. package/dist/nlp/Segmentation.js +8 -4
  221. package/dist/nlp/Segmentation.js.map +1 -1
  222. package/dist/nlp/TextNormalizer.d.ts +1 -0
  223. package/dist/nlp/TextNormalizer.d.ts.map +1 -0
  224. package/dist/recognition/AmazonTranscribeSTT.d.ts +3 -1
  225. package/dist/recognition/AmazonTranscribeSTT.d.ts.map +1 -0
  226. package/dist/recognition/AmazonTranscribeSTT.js +3 -3
  227. package/dist/recognition/AmazonTranscribeSTT.js.map +1 -1
  228. package/dist/recognition/AzureCognitiveServicesSTT.d.ts +3 -1
  229. package/dist/recognition/AzureCognitiveServicesSTT.d.ts.map +1 -0
  230. package/dist/recognition/AzureCognitiveServicesSTT.js +4 -4
  231. package/dist/recognition/AzureCognitiveServicesSTT.js.map +1 -1
  232. package/dist/recognition/DeepgramSTT.d.ts +3 -1
  233. package/dist/recognition/DeepgramSTT.d.ts.map +1 -0
  234. package/dist/recognition/DeepgramSTT.js +12 -13
  235. package/dist/recognition/DeepgramSTT.js.map +1 -1
  236. package/dist/recognition/GoogleCloudSTT.d.ts +3 -1
  237. package/dist/recognition/GoogleCloudSTT.d.ts.map +1 -0
  238. package/dist/recognition/GoogleCloudSTT.js +11 -10
  239. package/dist/recognition/GoogleCloudSTT.js.map +1 -1
  240. package/dist/recognition/OpenAICloudSTT.d.ts +3 -1
  241. package/dist/recognition/OpenAICloudSTT.d.ts.map +1 -0
  242. package/dist/recognition/OpenAICloudSTT.js +6 -6
  243. package/dist/recognition/OpenAICloudSTT.js.map +1 -1
  244. package/dist/recognition/WhisperCommon.d.ts +9 -0
  245. package/dist/recognition/WhisperCommon.d.ts.map +1 -0
  246. package/dist/recognition/WhisperCommon.js +52 -0
  247. package/dist/recognition/WhisperCommon.js.map +1 -0
  248. package/dist/recognition/{WhisperCppSTT.d.ts → WhisperCppCliSTT.d.ts} +14 -15
  249. package/dist/recognition/WhisperCppCliSTT.d.ts.map +1 -0
  250. package/dist/recognition/{WhisperCppSTT.js → WhisperCppCliSTT.js} +55 -84
  251. package/dist/recognition/WhisperCppCliSTT.js.map +1 -0
  252. package/dist/recognition/WhisperSTT.d.ts +73 -85
  253. package/dist/recognition/WhisperSTT.d.ts.map +1 -0
  254. package/dist/recognition/WhisperSTT.js +384 -519
  255. package/dist/recognition/WhisperSTT.js.map +1 -1
  256. package/dist/server/Client.d.ts +3 -2
  257. package/dist/server/Client.d.ts.map +1 -0
  258. package/dist/server/Client.js.map +1 -1
  259. package/dist/server/Server.d.ts +1 -0
  260. package/dist/server/Server.d.ts.map +1 -0
  261. package/dist/server/ServerStarter.d.ts +1 -0
  262. package/dist/server/ServerStarter.d.ts.map +1 -0
  263. package/dist/server/Worker.d.ts +7 -7
  264. package/dist/server/Worker.d.ts.map +1 -0
  265. package/dist/server/Worker.js +42 -44
  266. package/dist/server/Worker.js.map +1 -1
  267. package/dist/server/WorkerStarter.d.ts +1 -0
  268. package/dist/server/WorkerStarter.d.ts.map +1 -0
  269. package/dist/source-separation/MDXNetSourceSeparation.d.ts +4 -2
  270. package/dist/source-separation/MDXNetSourceSeparation.d.ts.map +1 -0
  271. package/dist/source-separation/MDXNetSourceSeparation.js +10 -8
  272. package/dist/source-separation/MDXNetSourceSeparation.js.map +1 -1
  273. package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.d.ts +4 -2
  274. package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.d.ts.map +1 -0
  275. package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.js +5 -5
  276. package/dist/speech-embeddings/WavToVec2BertFeatureEmbeddings.js.map +1 -1
  277. package/dist/speech-language-detection/SileroLanguageDetection.d.ts +6 -3
  278. package/dist/speech-language-detection/SileroLanguageDetection.d.ts.map +1 -0
  279. package/dist/speech-language-detection/SileroLanguageDetection.js +8 -8
  280. package/dist/speech-language-detection/SileroLanguageDetection.js.map +1 -1
  281. package/dist/speech-search/DTWSpeechSearch.d.ts +3 -1
  282. package/dist/speech-search/DTWSpeechSearch.d.ts.map +1 -0
  283. package/dist/speech-search/DTWSpeechSearch.js +4 -4
  284. package/dist/speech-search/DTWSpeechSearch.js.map +1 -1
  285. package/dist/subtitles/Subtitles.d.ts +14 -1
  286. package/dist/subtitles/Subtitles.d.ts.map +1 -0
  287. package/dist/subtitles/Subtitles.js +22 -22
  288. package/dist/subtitles/Subtitles.js.map +1 -1
  289. package/dist/synthesis/AwsPollyTTS.d.ts +4 -2
  290. package/dist/synthesis/AwsPollyTTS.d.ts.map +1 -0
  291. package/dist/synthesis/AwsPollyTTS.js +5 -5
  292. package/dist/synthesis/AwsPollyTTS.js.map +1 -1
  293. package/dist/synthesis/AzureCognitiveServicesTTS.d.ts +3 -1
  294. package/dist/synthesis/AzureCognitiveServicesTTS.d.ts.map +1 -0
  295. package/dist/synthesis/AzureCognitiveServicesTTS.js +3 -3
  296. package/dist/synthesis/AzureCognitiveServicesTTS.js.map +1 -1
  297. package/dist/synthesis/CoquiServerTTS.d.ts +3 -1
  298. package/dist/synthesis/CoquiServerTTS.d.ts.map +1 -0
  299. package/dist/synthesis/CoquiServerTTS.js +7 -8
  300. package/dist/synthesis/CoquiServerTTS.js.map +1 -1
  301. package/dist/synthesis/DeepgramTTS.d.ts +3 -2
  302. package/dist/synthesis/DeepgramTTS.d.ts.map +1 -0
  303. package/dist/synthesis/DeepgramTTS.js +13 -13
  304. package/dist/synthesis/DeepgramTTS.js.map +1 -1
  305. package/dist/synthesis/ElevenLabsTTS.d.ts +4 -3
  306. package/dist/synthesis/ElevenLabsTTS.d.ts.map +1 -0
  307. package/dist/synthesis/ElevenLabsTTS.js +22 -21
  308. package/dist/synthesis/ElevenLabsTTS.js.map +1 -1
  309. package/dist/synthesis/EspeakTTS.d.ts +12 -9
  310. package/dist/synthesis/EspeakTTS.d.ts.map +1 -0
  311. package/dist/synthesis/EspeakTTS.js +118 -68
  312. package/dist/synthesis/EspeakTTS.js.map +1 -1
  313. package/dist/synthesis/FliteTTS.d.ts +3 -2
  314. package/dist/synthesis/FliteTTS.d.ts.map +1 -0
  315. package/dist/synthesis/FliteTTS.js +2 -2
  316. package/dist/synthesis/FliteTTS.js.map +1 -1
  317. package/dist/synthesis/GnuSpeechTTS.d.ts +3 -2
  318. package/dist/synthesis/GnuSpeechTTS.d.ts.map +1 -0
  319. package/dist/synthesis/GnuSpeechTTS.js +1 -1
  320. package/dist/synthesis/GnuSpeechTTS.js.map +1 -1
  321. package/dist/synthesis/GoogleCloudTTS.d.ts +4 -2
  322. package/dist/synthesis/GoogleCloudTTS.d.ts.map +1 -0
  323. package/dist/synthesis/GoogleCloudTTS.js +15 -14
  324. package/dist/synthesis/GoogleCloudTTS.js.map +1 -1
  325. package/dist/synthesis/GoogleTranslateTTS.d.ts +4 -2
  326. package/dist/synthesis/GoogleTranslateTTS.d.ts.map +1 -0
  327. package/dist/synthesis/GoogleTranslateTTS.js +11 -11
  328. package/dist/synthesis/GoogleTranslateTTS.js.map +1 -1
  329. package/dist/synthesis/KokoroTTS.d.ts +5 -4
  330. package/dist/synthesis/KokoroTTS.d.ts.map +1 -0
  331. package/dist/synthesis/KokoroTTS.js +11 -10
  332. package/dist/synthesis/KokoroTTS.js.map +1 -1
  333. package/dist/synthesis/MicrosoftEdgeTTS.d.ts +5 -3
  334. package/dist/synthesis/MicrosoftEdgeTTS.d.ts.map +1 -0
  335. package/dist/synthesis/MicrosoftEdgeTTS.js +41 -20
  336. package/dist/synthesis/MicrosoftEdgeTTS.js.map +1 -1
  337. package/dist/synthesis/OpenAICloudTTS.d.ts +3 -2
  338. package/dist/synthesis/OpenAICloudTTS.d.ts.map +1 -0
  339. package/dist/synthesis/OpenAICloudTTS.js +6 -5
  340. package/dist/synthesis/OpenAICloudTTS.js.map +1 -1
  341. package/dist/synthesis/SamTTS.d.ts +3 -1
  342. package/dist/synthesis/SamTTS.d.ts.map +1 -0
  343. package/dist/synthesis/SamTTS.js +2 -2
  344. package/dist/synthesis/SamTTS.js.map +1 -1
  345. package/dist/synthesis/SapiTTS.d.ts +3 -2
  346. package/dist/synthesis/SapiTTS.d.ts.map +1 -0
  347. package/dist/synthesis/SapiTTS.js +2 -2
  348. package/dist/synthesis/SapiTTS.js.map +1 -1
  349. package/dist/synthesis/SvoxPicoTTS.d.ts +3 -2
  350. package/dist/synthesis/SvoxPicoTTS.d.ts.map +1 -0
  351. package/dist/synthesis/SvoxPicoTTS.js +3 -3
  352. package/dist/synthesis/SvoxPicoTTS.js.map +1 -1
  353. package/dist/synthesis/VitsTTS.d.ts +4 -3
  354. package/dist/synthesis/VitsTTS.d.ts.map +1 -0
  355. package/dist/synthesis/VitsTTS.js +14 -11
  356. package/dist/synthesis/VitsTTS.js.map +1 -1
  357. package/dist/tests/Test.d.ts +1 -0
  358. package/dist/tests/Test.d.ts.map +1 -0
  359. package/dist/text-language-detection/FastTextLanguageDetection.d.ts +1 -0
  360. package/dist/text-language-detection/FastTextLanguageDetection.d.ts.map +1 -0
  361. package/dist/text-language-detection/TinyLDLanguageDetection.d.ts +1 -0
  362. package/dist/text-language-detection/TinyLDLanguageDetection.d.ts.map +1 -0
  363. package/dist/text-translation/DeepLTextTranslation.d.ts +3 -2
  364. package/dist/text-translation/DeepLTextTranslation.d.ts.map +1 -0
  365. package/dist/text-translation/DeepLTextTranslation.js +10 -9
  366. package/dist/text-translation/DeepLTextTranslation.js.map +1 -1
  367. package/dist/text-translation/GoogleTranslateTextTranslation.d.ts +5 -4
  368. package/dist/text-translation/GoogleTranslateTextTranslation.d.ts.map +1 -0
  369. package/dist/text-translation/GoogleTranslateTextTranslation.js +20 -18
  370. package/dist/text-translation/GoogleTranslateTextTranslation.js.map +1 -1
  371. package/dist/text-translation/NLLBTextTranslation.d.ts +3 -2
  372. package/dist/text-translation/NLLBTextTranslation.d.ts.map +1 -0
  373. package/dist/text-translation/NLLBTextTranslation.js +4 -6
  374. package/dist/text-translation/NLLBTextTranslation.js.map +1 -1
  375. package/dist/typings/TypedArray.d.ts +1 -0
  376. package/dist/typings/TypedArray.d.ts.map +1 -0
  377. package/dist/utilities/BrowserRequestHeaders.d.ts +1 -0
  378. package/dist/utilities/BrowserRequestHeaders.d.ts.map +1 -0
  379. package/dist/utilities/Compression.d.ts +5 -3
  380. package/dist/utilities/Compression.d.ts.map +1 -0
  381. package/dist/utilities/Compression.js +9 -9
  382. package/dist/utilities/Compression.js.map +1 -1
  383. package/dist/utilities/FileDownloader.d.ts +7 -3
  384. package/dist/utilities/FileDownloader.d.ts.map +1 -0
  385. package/dist/utilities/FileDownloader.js +25 -21
  386. package/dist/utilities/FileDownloader.js.map +1 -1
  387. package/dist/utilities/FileReader.d.ts +1 -0
  388. package/dist/utilities/FileReader.d.ts.map +1 -0
  389. package/dist/utilities/FileReader.js.map +1 -1
  390. package/dist/utilities/FileSystem.d.ts +1 -0
  391. package/dist/utilities/FileSystem.d.ts.map +1 -0
  392. package/dist/utilities/FileSystem.js +1 -1
  393. package/dist/utilities/FileSystem.js.map +1 -1
  394. package/dist/utilities/FileWriter.d.ts +1 -0
  395. package/dist/utilities/FileWriter.d.ts.map +1 -0
  396. package/dist/utilities/FileWriter.js.map +1 -1
  397. package/dist/utilities/Hashing.d.ts +1 -0
  398. package/dist/utilities/Hashing.d.ts.map +1 -0
  399. package/dist/utilities/Hashing.js.map +1 -1
  400. package/dist/utilities/Locale.d.ts +1 -0
  401. package/dist/utilities/Locale.d.ts.map +1 -0
  402. package/dist/utilities/Locale.js.map +1 -1
  403. package/dist/utilities/Logger.d.ts +18 -9
  404. package/dist/utilities/Logger.d.ts.map +1 -0
  405. package/dist/utilities/Logger.js +50 -35
  406. package/dist/utilities/Logger.js.map +1 -1
  407. package/dist/utilities/NpmUtilities.d.ts +1 -0
  408. package/dist/utilities/NpmUtilities.d.ts.map +1 -0
  409. package/dist/utilities/NpmUtilities.js +4 -5
  410. package/dist/utilities/NpmUtilities.js.map +1 -1
  411. package/dist/utilities/ObjectUtilities.d.ts +1 -0
  412. package/dist/utilities/ObjectUtilities.d.ts.map +1 -0
  413. package/dist/utilities/ObjectUtilities.js.map +1 -1
  414. package/dist/utilities/OnnxUtilities.d.ts +1 -0
  415. package/dist/utilities/OnnxUtilities.d.ts.map +1 -0
  416. package/dist/utilities/OpenPromise.d.ts +1 -0
  417. package/dist/utilities/OpenPromise.d.ts.map +1 -0
  418. package/dist/utilities/OpenPromise.js.map +1 -1
  419. package/dist/utilities/PackageManager.d.ts +5 -1
  420. package/dist/utilities/PackageManager.d.ts.map +1 -0
  421. package/dist/utilities/PackageManager.js +37 -22
  422. package/dist/utilities/PackageManager.js.map +1 -1
  423. package/dist/utilities/PathUtilities.d.ts +3 -0
  424. package/dist/utilities/PathUtilities.d.ts.map +1 -0
  425. package/dist/utilities/PathUtilities.js +5 -2
  426. package/dist/utilities/PathUtilities.js.map +1 -1
  427. package/dist/utilities/RandomGenerator.d.ts +1 -0
  428. package/dist/utilities/RandomGenerator.d.ts.map +1 -0
  429. package/dist/utilities/SignalChannel.d.ts +1 -0
  430. package/dist/utilities/SignalChannel.d.ts.map +1 -0
  431. package/dist/utilities/SmoothEstimator.d.ts +1 -0
  432. package/dist/utilities/SmoothEstimator.d.ts.map +1 -0
  433. package/dist/utilities/SmoothEstimator.js.map +1 -1
  434. package/dist/utilities/StringBuilder.d.ts +1 -0
  435. package/dist/utilities/StringBuilder.d.ts.map +1 -0
  436. package/dist/utilities/StringUtilities.d.ts +1 -0
  437. package/dist/utilities/StringUtilities.d.ts.map +1 -0
  438. package/dist/utilities/TarballMaker.d.ts +5 -3
  439. package/dist/utilities/TarballMaker.d.ts.map +1 -0
  440. package/dist/utilities/TarballMaker.js +6 -6
  441. package/dist/utilities/TarballMaker.js.map +1 -1
  442. package/dist/utilities/Timeline.d.ts +1 -0
  443. package/dist/utilities/Timeline.d.ts.map +1 -0
  444. package/dist/utilities/Timeline.js.map +1 -1
  445. package/dist/utilities/Timer.d.ts +1 -0
  446. package/dist/utilities/Timer.d.ts.map +1 -0
  447. package/dist/utilities/Utilities.d.ts +10 -7
  448. package/dist/utilities/Utilities.d.ts.map +1 -0
  449. package/dist/utilities/Utilities.js +49 -31
  450. package/dist/utilities/Utilities.js.map +1 -1
  451. package/dist/utilities/VirtualFileReadStream.d.ts +1 -0
  452. package/dist/utilities/VirtualFileReadStream.d.ts.map +1 -0
  453. package/dist/utilities/WebReader.d.ts +3 -1
  454. package/dist/utilities/WebReader.d.ts.map +1 -0
  455. package/dist/utilities/WebReader.js +7 -6
  456. package/dist/utilities/WebReader.js.map +1 -1
  457. package/dist/utilities/WikipediaReader.d.ts +3 -1
  458. package/dist/utilities/WikipediaReader.d.ts.map +1 -0
  459. package/dist/utilities/WikipediaReader.js +1 -5
  460. package/dist/utilities/WikipediaReader.js.map +1 -1
  461. package/dist/voice-activity-detection/AdaptiveGateVAD.d.ts +3 -1
  462. package/dist/voice-activity-detection/AdaptiveGateVAD.d.ts.map +1 -0
  463. package/dist/voice-activity-detection/AdaptiveGateVAD.js +1 -1
  464. package/dist/voice-activity-detection/AdaptiveGateVAD.js.map +1 -1
  465. package/dist/voice-activity-detection/SileroVAD.d.ts +1 -0
  466. package/dist/voice-activity-detection/SileroVAD.d.ts.map +1 -0
  467. package/dist/voice-activity-detection/SileroVAD.js.map +1 -1
  468. package/dist/voice-activity-detection/WebRtcVAD.d.ts +1 -0
  469. package/dist/voice-activity-detection/WebRtcVAD.d.ts.map +1 -0
  470. package/dist/voice-activity-detection/WebRtcVAD.js +1 -1
  471. package/dist/voice-activity-detection/WebRtcVAD.js.map +1 -1
  472. package/docs/API.md +62 -17
  473. package/docs/CUDA.md +4 -3
  474. package/docs/Engines.md +8 -7
  475. package/docs/Licenses.md +0 -3
  476. package/docs/Options.md +27 -31
  477. package/docs/Server.md +1 -0
  478. package/docs/Tasklist.md +2 -1
  479. package/docs/Technical.md +2 -2
  480. package/package.json +45 -35
  481. package/src/alignment/SemanticTextAlignment.ts +14 -7
  482. package/src/alignment/SpeechAlignment.ts +47 -150
  483. package/src/api/APIOptions.ts +1 -1
  484. package/src/api/Alignment.ts +95 -61
  485. package/src/api/Common.ts +11 -0
  486. package/src/api/Denoising.ts +22 -17
  487. package/src/api/GlobalOptions.ts +4 -20
  488. package/src/api/Recognition.ts +106 -123
  489. package/src/api/SourceSeparation.ts +39 -21
  490. package/src/api/SpeechLanguageDetection.ts +77 -37
  491. package/src/api/SpeechSearch.ts +6 -1
  492. package/src/api/SpeechTranslation.ts +75 -38
  493. package/src/api/Synthesis.ts +220 -116
  494. package/src/api/TextLanguageDetection.ts +10 -12
  495. package/src/api/TextTranslation.ts +43 -26
  496. package/src/api/TimelineTranslationAlignment.ts +41 -13
  497. package/src/api/TranscriptAndTranslationAlignment.ts +28 -15
  498. package/src/api/TranslationAlignment.ts +53 -24
  499. package/src/api/VoiceActivityDetection.ts +33 -68
  500. package/src/audio/AudioPlayer.ts +4 -232
  501. package/src/audio/AudioUtilities.ts +9 -2
  502. package/src/build-tools/MakeTarballsForInstalledPackages.ts +4 -3
  503. package/src/cli/CLI.ts +209 -101
  504. package/src/codecs/FFMpegTranscoder.ts +18 -16
  505. package/src/denoising/NSNet2.ts +5 -4
  506. package/src/denoising/RNNoise.ts +14 -6
  507. package/src/dsp/FFT.ts +2 -1
  508. package/src/dsp/MFCC.ts +7 -5
  509. package/src/dsp/MelSpectrogram.ts +56 -36
  510. package/src/dsp/Rubberband.ts +10 -3
  511. package/src/dsp/Sonic.ts +2 -1
  512. package/src/dsp/SpeexResampler.ts +2 -1
  513. package/src/encodings/Ascii.ts +1 -1
  514. package/src/encodings/Base64.ts +1 -1
  515. package/src/math/VectorMath.ts +10 -6
  516. package/src/nlp/EspeakPhonemizer.ts +2 -2
  517. package/src/nlp/Segmentation.ts +9 -4
  518. package/src/recognition/AmazonTranscribeSTT.ts +4 -3
  519. package/src/recognition/AzureCognitiveServicesSTT.ts +5 -4
  520. package/src/recognition/DeepgramSTT.ts +16 -16
  521. package/src/recognition/GoogleCloudSTT.ts +14 -12
  522. package/src/recognition/OpenAICloudSTT.ts +12 -6
  523. package/src/recognition/WhisperCommon.ts +130 -0
  524. package/src/recognition/{WhisperCppSTT.ts → WhisperCppCliSTT.ts} +73 -133
  525. package/src/recognition/WhisperSTT.ts +569 -718
  526. package/src/server/Client.ts +4 -4
  527. package/src/server/Worker.ts +59 -59
  528. package/src/source-separation/MDXNetSourceSeparation.ts +15 -10
  529. package/src/speech-embeddings/WavToVec2BertFeatureEmbeddings.ts +7 -5
  530. package/src/speech-language-detection/SileroLanguageDetection.ts +18 -9
  531. package/src/speech-search/DTWSpeechSearch.ts +6 -5
  532. package/src/subtitles/Subtitles.ts +22 -22
  533. package/src/synthesis/AwsPollyTTS.ts +12 -5
  534. package/src/synthesis/AzureCognitiveServicesTTS.ts +11 -3
  535. package/src/synthesis/CoquiServerTTS.ts +8 -7
  536. package/src/synthesis/DeepgramTTS.ts +21 -15
  537. package/src/synthesis/ElevenLabsTTS.ts +33 -23
  538. package/src/synthesis/EspeakTTS.ts +145 -69
  539. package/src/synthesis/FliteTTS.ts +3 -3
  540. package/src/synthesis/GnuSpeechTTS.ts +2 -2
  541. package/src/synthesis/GoogleCloudTTS.ts +23 -14
  542. package/src/synthesis/GoogleTranslateTTS.ts +19 -11
  543. package/src/synthesis/KokoroTTS.ts +37 -14
  544. package/src/synthesis/MicrosoftEdgeTTS.ts +71 -23
  545. package/src/synthesis/OpenAICloudTTS.ts +7 -6
  546. package/src/synthesis/SamTTS.ts +3 -2
  547. package/src/synthesis/SapiTTS.ts +3 -3
  548. package/src/synthesis/SvoxPicoTTS.ts +4 -5
  549. package/src/synthesis/VitsTTS.ts +43 -15
  550. package/src/text-translation/DeepLTextTranslation.ts +12 -10
  551. package/src/text-translation/GoogleTranslateTextTranslation.ts +35 -21
  552. package/src/text-translation/NLLBTextTranslation.ts +5 -9
  553. package/src/typings/Fillers.d.ts +0 -60
  554. package/src/typings/TypedArray.ts +12 -1
  555. package/src/utilities/Compression.ts +10 -9
  556. package/src/utilities/FileDownloader.ts +38 -23
  557. package/src/utilities/FileSystem.ts +1 -1
  558. package/src/utilities/Logger.ts +59 -42
  559. package/src/utilities/NpmUtilities.ts +4 -6
  560. package/src/utilities/OpenPromise.ts +1 -2
  561. package/src/utilities/PackageManager.ts +53 -26
  562. package/src/utilities/PathUtilities.ts +6 -2
  563. package/src/utilities/TarballMaker.ts +7 -7
  564. package/src/utilities/Utilities.ts +58 -39
  565. package/src/utilities/WebReader.ts +11 -6
  566. package/src/utilities/WikipediaReader.ts +2 -8
  567. package/src/voice-activity-detection/AdaptiveGateVAD.ts +13 -8
  568. package/src/voice-activity-detection/WebRtcVAD.ts +1 -2
  569. package/tsconfig.json +53 -94
  570. package/dist/audio/AudioRecorder.d.ts +0 -3
  571. package/dist/audio/AudioRecorder.js +0 -68
  572. package/dist/audio/AudioRecorder.js.map +0 -1
  573. package/dist/audio/SoxPath.d.ts +0 -1
  574. package/dist/audio/SoxPath.js +0 -24
  575. package/dist/audio/SoxPath.js.map +0 -1
  576. package/dist/recognition/SileroSTT.d.ts +0 -29
  577. package/dist/recognition/SileroSTT.js +0 -152
  578. package/dist/recognition/SileroSTT.js.map +0 -1
  579. package/dist/recognition/VoskSTT.d.ts +0 -10
  580. package/dist/recognition/VoskSTT.js +0 -72
  581. package/dist/recognition/VoskSTT.js.map +0 -1
  582. package/dist/recognition/WhisperCppSTT.js.map +0 -1
  583. package/dist/synthesis/StreamlabsPollyTTS.d.ts +0 -11
  584. package/dist/synthesis/StreamlabsPollyTTS.js +0 -88
  585. package/dist/synthesis/StreamlabsPollyTTS.js.map +0 -1
  586. package/dist/utilities/BinaryUtilities.d.ts +0 -13
  587. package/dist/utilities/BinaryUtilities.js +0 -113
  588. package/dist/utilities/BinaryUtilities.js.map +0 -1
  589. package/src/audio/AudioRecorder.ts +0 -91
  590. package/src/audio/SoxPath.ts +0 -31
  591. package/src/recognition/SileroSTT.ts +0 -222
  592. package/src/recognition/VoskSTT.ts +0 -112
  593. package/src/synthesis/StreamlabsPollyTTS.ts +0 -114
  594. package/src/utilities/BinaryUtilities.ts +0 -138
  595. /package/{LICENSE.md → LICENSE.GPLv3.md} +0 -0
package/tsconfig.json CHANGED
@@ -1,96 +1,55 @@
1
1
  {
2
- "include": ["src/**/*"],
3
- "compilerOptions": {
4
- /* Visit https://aka.ms/tsconfig to read more about this file */
5
- /* Projects */
6
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
- /* Language and Environment */
13
- "target": "ES2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
14
- // "lib": ["ES2022"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
15
- // "jsx": "preserve", /* Specify what JSX code is generated. */
16
- // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
17
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
18
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
19
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
20
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
21
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
22
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
23
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
24
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
25
- /* Modules */
26
- "module": "Node16", /* Specify what module code is generated. */
27
- //"rootDir": "./src", /* Specify the root folder within your source files. */
28
- "moduleResolution": "Node16", /* Specify how TypeScript looks up a file from a given module specifier. */
29
- // "baseUrl": "./src", /* Specify the base directory to resolve non-relative module names. */
30
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
31
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
32
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
33
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
34
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
35
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
36
- // "resolveJsonModule": true, /* Enable importing .json files. */
37
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
38
- /* JavaScript Support */
39
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
40
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
41
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
42
- /* Emit */
43
- "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
44
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
45
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
46
- "sourceMap": true, /* Create source map files for emitted JavaScript files. */
47
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
48
- "outDir": "./dist", /* Specify an output folder for all emitted files. */
49
- // "removeComments": true, /* Disable emitting comments. */
50
- // "noEmit": true, /* Disable emitting files from a compilation. */
51
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
52
- "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
53
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
54
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
55
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
56
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
57
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
58
- "emitBOM": false, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
59
- "newLine": "lf", /* Set the newline character for emitting files. */
60
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
61
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
62
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
63
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
64
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
65
- // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
66
- /* Interop Constraints */
67
- "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
68
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
69
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
70
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
71
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
72
- /* Type Checking */
73
- "strict": true, /* Enable all strict type-checking options. */
74
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
75
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
76
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
77
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
78
- "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
79
- "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
80
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
81
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
82
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
83
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
84
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
85
- "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
86
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
87
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
88
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
89
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
90
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
91
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
92
- /* Completeness */
93
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
94
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
95
- }
2
+ // Visit https://aka.ms/tsconfig to read more about this file
3
+ "compilerOptions": {
4
+ // File Layout
5
+ "rootDir": "./src",
6
+ "outDir": "./dist",
7
+
8
+ // Environment Settings
9
+ // See also https://aka.ms/tsconfig/module
10
+ "module": "nodenext",
11
+ "target": "esnext",
12
+ "types": ["node"],
13
+ // For nodejs:
14
+ // "lib": ["esnext"],
15
+ // "types": ["node"],
16
+ // and npm install -D @types/node
17
+
18
+ // Other Outputs
19
+ "sourceMap": true,
20
+ "declaration": true,
21
+ "declarationMap": true,
22
+
23
+ // Stricter Typechecking Options
24
+ // "noUncheckedIndexedAccess": true,
25
+ // "exactOptionalPropertyTypes": true,
26
+
27
+ // Style Options
28
+ "noImplicitReturns": true,
29
+ // "noImplicitOverride": true,
30
+ // "noUnusedLocals": true,
31
+ // "noUnusedParameters": true,
32
+ // "noFallthroughCasesInSwitch": true,
33
+ // "noPropertyAccessFromIndexSignature": true,
34
+
35
+ // Recommended Options
36
+ "strict": true,
37
+ "jsx": "react-jsx",
38
+ // "verbatimModuleSyntax": true,
39
+ "isolatedModules": true,
40
+ "noUncheckedSideEffectImports": true,
41
+ "moduleDetection": "force",
42
+ "skipLibCheck": true,
43
+
44
+ // Extended options not in generated tsconfig.json
45
+ "newLine": "lf",
46
+ "forceConsistentCasingInFileNames": true,
47
+ "alwaysStrict": true,
48
+
49
+ "noImplicitThis": true,
50
+ "strictBindCallApply": true,
51
+ "strictFunctionTypes": true,
52
+
53
+ "noErrorTruncation": true,
54
+ }
96
55
  }
@@ -1,3 +0,0 @@
1
- import { RawAudio } from './AudioUtilities.js';
2
- export declare function recordAudioInput(channelCount?: number, sampleRate?: number, maxTime?: number): Promise<RawAudio>;
3
- export declare function captureAudioInput(channelCount?: number, sampleRate?: number, maxTime?: number, onAudioSamples?: (rawAudio: Float32Array[]) => void): Promise<void>;
@@ -1,68 +0,0 @@
1
- import { spawn } from 'child_process';
2
- import { concatAudioSegments } from './AudioUtilities.js';
3
- import * as AudioBufferConversion from './AudioBufferConversion.js';
4
- import { Timer } from '../utilities/Timer.js';
5
- import { logToStderr } from '../utilities/Utilities.js';
6
- import { OpenPromise } from '../utilities/OpenPromise.js';
7
- import { tryResolvingSoxPath } from './SoxPath.js';
8
- import { SampleFormat } from './AudioBufferConversion.js';
9
- const log = logToStderr;
10
- export async function recordAudioInput(channelCount = 1, sampleRate = 48000, maxTime = 10) {
11
- const audioSegments = [];
12
- await captureAudioInput(channelCount, sampleRate, maxTime, (rawAudio) => {
13
- audioSegments.push(rawAudio);
14
- });
15
- const mergedAudio = concatAudioSegments(audioSegments);
16
- const rawAudio = {
17
- audioChannels: mergedAudio,
18
- sampleRate
19
- };
20
- return rawAudio;
21
- }
22
- export function captureAudioInput(channelCount = 1, sampleRate = 48000, maxTime = -1, onAudioSamples) {
23
- return new Promise(async (resolve, reject) => {
24
- const timer = new Timer();
25
- const recorderSpawnedOpenPromise = new OpenPromise();
26
- const soxPath = await tryResolvingSoxPath();
27
- if (!soxPath) {
28
- throw new Error('Could not resolve a SoX executable');
29
- }
30
- let args;
31
- if (process.platform == 'win32') {
32
- args = ['-b', `${16}`, '--endian', 'little',
33
- '-c', `${channelCount}`, '-r', `${sampleRate}`, '-e', 'signed',
34
- '-t', 'waveaudio', 'default', '-t', 'raw', '-'];
35
- }
36
- else if (process.platform == 'darwin') {
37
- args = ['-b', `${16}`, '--endian', 'little',
38
- '-c', `${channelCount}`, '-r', `${sampleRate}`, '-e', 'signed',
39
- '-t', 'raw', '-'];
40
- }
41
- else {
42
- throw new Error('');
43
- }
44
- const recorder = spawn(soxPath, args, {});
45
- recorder.once('spawn', () => {
46
- recorderSpawnedOpenPromise.resolve(null);
47
- timer.restart();
48
- });
49
- recorder.once('close', () => {
50
- resolve();
51
- });
52
- recorder.stderr.on('data', (chunk) => {
53
- //log(chunk.toString('utf8'))
54
- });
55
- recorder.stdout.on('data', (chunk) => {
56
- //log(chunk)
57
- const audioChannels = AudioBufferConversion.decodeToChannels(chunk, channelCount, 16, SampleFormat.PCM);
58
- if (onAudioSamples) {
59
- onAudioSamples(audioChannels);
60
- }
61
- if (maxTime >= 0 && timer.elapsedTimeSeconds >= maxTime) {
62
- recorder.kill();
63
- resolve();
64
- }
65
- });
66
- });
67
- }
68
- //# sourceMappingURL=AudioRecorder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AudioRecorder.js","sourceRoot":"","sources":["../../src/audio/AudioRecorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAErC,OAAO,EAAY,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACnE,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAA;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,GAAG,GAAG,WAAW,CAAA;AAEvB,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,YAAY,GAAG,CAAC,EAAE,UAAU,GAAG,KAAK,EAAE,OAAO,GAAG,EAAE;IACxF,MAAM,aAAa,GAAqB,EAAE,CAAA;IAE1C,MAAM,iBAAiB,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;QACvE,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,MAAM,WAAW,GAAG,mBAAmB,CAAC,aAAa,CAAC,CAAA;IAEtD,MAAM,QAAQ,GAAa;QAC1B,aAAa,EAAE,WAAW;QAC1B,UAAU;KACV,CAAA;IAED,OAAO,QAAQ,CAAA;AAChB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,YAAY,GAAG,CAAC,EAAE,UAAU,GAAG,KAAK,EAAE,OAAO,GAAG,CAAC,CAAC,EAAE,cAAmD;IACxI,OAAO,IAAI,OAAO,CAAO,KAAK,EAAE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CAAC,CAAC,CAAA;QAEF,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;YAC3B,OAAO,EAAE,CAAA;QACV,CAAC,CAAC,CAAA;QAEF,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YACpC,6BAA6B;QAC9B,CAAC,CAAC,CAAA;QAEF,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;YACpC,YAAY;YAEZ,MAAM,aAAa,GAAG,qBAAqB,CAAC,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;YAEvG,IAAI,cAAc,EAAE,CAAC;gBACpB,cAAc,CAAC,aAAa,CAAC,CAAA;YAC9B,CAAC;YAED,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,CAAC,kBAAkB,IAAI,OAAO,EAAE,CAAC;gBACzD,QAAQ,CAAC,IAAI,EAAE,CAAA;gBACf,OAAO,EAAE,CAAA;YACV,CAAC;QACF,CAAC,CAAC,CAAA;IACH,CAAC,CAAC,CAAA;AACH,CAAC"}
@@ -1 +0,0 @@
1
- export declare function tryResolvingSoxPath(): Promise<string | undefined>;
@@ -1,24 +0,0 @@
1
- import { loadPackage } from '../utilities/PackageManager.js';
2
- import { commandExists } from '../utilities/Utilities.js';
3
- import { getGlobalOption } from '../api/GlobalOptions.js';
4
- import { joinPath } from '../utilities/PathUtilities.js';
5
- export async function tryResolvingSoxPath() {
6
- if (getGlobalOption('soxPath')) {
7
- return getGlobalOption('soxPath');
8
- }
9
- const platform = process.platform;
10
- const arch = process.arch;
11
- if (platform === 'win32') {
12
- const soxPackagePath = await loadPackage('sox-14.4.1a-win32');
13
- return joinPath(soxPackagePath, 'sox.exe');
14
- }
15
- if (await commandExists('sox')) {
16
- return 'sox';
17
- }
18
- if (platform === 'linux' && arch === 'x64') {
19
- const soxPackagePath = await loadPackage('sox-14.4.2-linux-minimal');
20
- return joinPath(soxPackagePath, 'sox');
21
- }
22
- return undefined;
23
- }
24
- //# sourceMappingURL=SoxPath.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SoxPath.js","sourceRoot":"","sources":["../../src/audio/SoxPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAExD,MAAM,CAAC,KAAK,UAAU,mBAAmB;IACxC,IAAI,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAA;IAClC,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAA;IACjC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;IAEzB,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC1B,MAAM,cAAc,GAAG,MAAM,WAAW,CAAC,mBAAmB,CAAC,CAAA;QAE7D,OAAO,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC,CAAA;IAC3C,CAAC;IAED,IAAI,MAAM,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,KAAK,CAAA;IACb,CAAC;IAED,IAAI,QAAQ,KAAK,OAAO,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QAC5C,MAAM,cAAc,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,CAAA;QAEpE,OAAO,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;IACvC,CAAC;IAED,OAAO,SAAS,CAAA;AACjB,CAAC"}
@@ -1,29 +0,0 @@
1
- import { Timeline } from '../utilities/Timeline.js';
2
- import { RawAudio } from '../audio/AudioUtilities.js';
3
- import type * as Onnx from 'onnxruntime-node';
4
- import { OnnxExecutionProvider } from '../utilities/OnnxUtilities.js';
5
- export declare function recognize(rawAudio: RawAudio, modelDirectoryPath: string, executionProviders: OnnxExecutionProvider[]): Promise<{
6
- transcript: string;
7
- timeline: Timeline;
8
- }>;
9
- export declare class SileroSTT {
10
- readonly modelDirectoryPath: string;
11
- readonly executionProviders: OnnxExecutionProvider[];
12
- session?: Onnx.InferenceSession;
13
- labels?: string[];
14
- constructor(modelDirectoryPath: string, executionProviders: OnnxExecutionProvider[]);
15
- recognize(rawAudio: RawAudio): Promise<{
16
- transcript: string;
17
- timeline: Timeline;
18
- }>;
19
- private initializeIfNeeded;
20
- private tokensToTimeline;
21
- }
22
- export declare const languageCodeToPackageName: {
23
- [languageCode: string]: string;
24
- };
25
- export interface SileroRecognitionOptions {
26
- modelPath?: string;
27
- provider?: OnnxExecutionProvider;
28
- }
29
- export declare const defaultSileroRecognitionOptions: SileroRecognitionOptions;
@@ -1,152 +0,0 @@
1
- import { indexOfMax } from '../math/VectorMath.js';
2
- import { wordCharacterRegExp } from '../nlp/Segmentation.js';
3
- import { Logger } from '../utilities/Logger.js';
4
- import { logToStderr } from '../utilities/Utilities.js';
5
- import { getRawAudioDuration } from '../audio/AudioUtilities.js';
6
- import { readAndParseJsonFile } from '../utilities/FileSystem.js';
7
- import { getOnnxSessionOptions } from '../utilities/OnnxUtilities.js';
8
- import { joinPath } from '../utilities/PathUtilities.js';
9
- const log = logToStderr;
10
- export async function recognize(rawAudio, modelDirectoryPath, executionProviders) {
11
- const silero = new SileroSTT(modelDirectoryPath, executionProviders);
12
- const result = await silero.recognize(rawAudio);
13
- return result;
14
- }
15
- export class SileroSTT {
16
- modelDirectoryPath;
17
- executionProviders;
18
- session;
19
- labels;
20
- constructor(modelDirectoryPath, executionProviders) {
21
- this.modelDirectoryPath = modelDirectoryPath;
22
- this.executionProviders = executionProviders;
23
- }
24
- async recognize(rawAudio) {
25
- const logger = new Logger();
26
- await this.initializeIfNeeded();
27
- logger.start('Recognize with silero model');
28
- const audioSamples = rawAudio.audioChannels[0];
29
- const Onnx = await import('onnxruntime-node');
30
- const inputTensor = new Onnx.Tensor('float32', audioSamples, [1, audioSamples.length]);
31
- const inputs = { input: inputTensor };
32
- const results = await this.session.run(inputs);
33
- const rawResultValues = results['output'].data;
34
- const labels = this.labels;
35
- const tokenResults = [];
36
- for (let i = 0; i < rawResultValues.length; i += labels.length) {
37
- tokenResults.push(rawResultValues.subarray(i, i + labels.length));
38
- }
39
- const tokens = [];
40
- for (const tokenResult of tokenResults) {
41
- const bestCandidateIndex = indexOfMax(new Array(...tokenResult));
42
- tokens.push(labels[bestCandidateIndex]);
43
- }
44
- //log(tokens.join('|'))
45
- const result = this.tokensToTimeline(tokens, getRawAudioDuration(rawAudio));
46
- logger.end();
47
- return result;
48
- }
49
- async initializeIfNeeded() {
50
- if (this.session) {
51
- return;
52
- }
53
- const logger = new Logger();
54
- logger.start('Create ONNX inference session');
55
- const Onnx = await import('onnxruntime-node');
56
- const modelPath = joinPath(this.modelDirectoryPath, 'model.onnx');
57
- const labelsPath = joinPath(this.modelDirectoryPath, 'labels.json');
58
- this.labels = await readAndParseJsonFile(labelsPath);
59
- const onnxSessionOptions = getOnnxSessionOptions({ executionProviders: this.executionProviders });
60
- this.session = await Onnx.InferenceSession.create(modelPath, onnxSessionOptions);
61
- logger.end();
62
- }
63
- tokensToTimeline(tokens, totalDuration) {
64
- const tokenCount = tokens.length;
65
- const decodedTokens = [];
66
- let tokenGroupIndexes = [[]];
67
- for (let i = 0; i < tokenCount; i++) {
68
- const token = tokens[i];
69
- if (token == '2') {
70
- if (decodedTokens.length > 0) {
71
- const previousDecodedToken = decodedTokens[decodedTokens.length - 1];
72
- decodedTokens.push('$');
73
- decodedTokens.push(previousDecodedToken);
74
- tokenGroupIndexes[tokenGroupIndexes.length - 1].push(i);
75
- }
76
- else {
77
- decodedTokens.push(' ');
78
- tokenGroupIndexes.push([]);
79
- }
80
- continue;
81
- }
82
- if (token == '_') {
83
- continue;
84
- }
85
- decodedTokens.push(token);
86
- if (token == ' ') {
87
- tokenGroupIndexes.push([]);
88
- }
89
- else {
90
- tokenGroupIndexes[tokenGroupIndexes.length - 1].push(i);
91
- }
92
- }
93
- let decodedString = '';
94
- for (let i = 0; i < decodedTokens.length; i++) {
95
- const currentToken = decodedTokens[i];
96
- const previousToken = decodedTokens[i - 1];
97
- if (currentToken != '$' && (previousToken != currentToken || previousToken == undefined)) {
98
- decodedString += currentToken;
99
- }
100
- }
101
- decodedString = decodedString.trim();
102
- tokenGroupIndexes = tokenGroupIndexes.filter(group => group.length > 0);
103
- if (tokenGroupIndexes.length > 0) {
104
- let currentCorrection = Math.min(tokenGroupIndexes[0][0], 1.5);
105
- for (let i = 0; i < tokenGroupIndexes.length; i++) {
106
- const group = tokenGroupIndexes[i];
107
- if (group.length == 1) {
108
- group.push(group[0]);
109
- }
110
- group[0] -= currentCorrection;
111
- if (i == tokenGroupIndexes.length - 1) {
112
- currentCorrection = Math.min(tokenCount - i, 1.5);
113
- }
114
- else {
115
- currentCorrection = Math.min((tokenGroupIndexes[i + 1][0] - group[group.length - 1]) / 2, 1.5);
116
- }
117
- group[group.length - 1] += currentCorrection;
118
- }
119
- }
120
- const words = decodedString.split(' ');
121
- const timeMultiplier = totalDuration / tokenCount;
122
- const timeline = [];
123
- for (let i = 0; i < words.length; i++) {
124
- const text = words[i];
125
- if (!wordCharacterRegExp.test(text)) {
126
- continue;
127
- }
128
- const group = tokenGroupIndexes[i];
129
- const startTime = group[0] * timeMultiplier;
130
- const endTime = group[group.length - 1] * timeMultiplier;
131
- timeline.push({
132
- type: 'word',
133
- text: text,
134
- startTime,
135
- endTime,
136
- });
137
- }
138
- timeline[timeline.length - 1].endTime = totalDuration;
139
- return { transcript: decodedString, timeline };
140
- }
141
- }
142
- export const languageCodeToPackageName = {
143
- 'en': 'silero-en-v5',
144
- 'es': 'silero-es-v1',
145
- 'de': 'silero-de-v1',
146
- 'uk': 'silero-ua-v3',
147
- };
148
- export const defaultSileroRecognitionOptions = {
149
- modelPath: undefined,
150
- provider: undefined,
151
- };
152
- //# sourceMappingURL=SileroSTT.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SileroSTT.js","sourceRoot":"","sources":["../../src/recognition/SileroSTT.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAEvD,OAAO,EAAY,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,EAAyB,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAExD,MAAM,GAAG,GAAG,WAAW,CAAA;AAEvB,MAAM,CAAC,KAAK,UAAU,SAAS,CAC9B,QAAkB,EAClB,kBAA0B,EAC1B,kBAA2C;IAE3C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAA;IAEpE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IAE/C,OAAO,MAAM,CAAA;AACd,CAAC;AAED,MAAM,OAAO,SAAS;IAKJ;IACA;IALjB,OAAO,CAAwB;IAC/B,MAAM,CAAW;IAEjB,YACiB,kBAA0B,EAC1B,kBAA2C;QAD3C,uBAAkB,GAAlB,kBAAkB,CAAQ;QAC1B,uBAAkB,GAAlB,kBAAkB,CAAyB;IAE5D,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,QAAkB;QACjC,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAA;QAE3B,MAAM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Utilities.js';
3
- export declare function recognizeFile(filename: string, modelPath: string, verbose?: boolean): Promise<{
4
- transcript: string;
5
- timeline: Timeline;
6
- }>;
7
- export declare function recognize(rawAudio: RawAudio, modelPath: string, verbose?: boolean): Promise<{
8
- transcript: string;
9
- timeline: Timeline;
10
- }>;
@@ -1,72 +0,0 @@
1
- import * as FFMpegTranscoder from '../codecs/FFMpegTranscoder.js';
2
- import * as AudioBufferConversion from '../audio/AudioBufferConversion.js';
3
- import { Logger } from '../utilities/Logger.js';
4
- import { concatUint8Arrays, logToStderr } from '../utilities/Utilities.js';
5
- const log = logToStderr;
6
- export async function recognizeFile(filename, modelPath, verbose = true) {
7
- const rawAudio = await FFMpegTranscoder.decodeToChannels(filename, 16000, 1);
8
- return recognize(rawAudio, modelPath, verbose);
9
- }
10
- export async function recognize(rawAudio, modelPath, verbose = true) {
11
- const logger = new Logger();
12
- logger.start('Initialize vosk recognizer');
13
- const audioChannels = rawAudio.audioChannels;
14
- const sampleRate = rawAudio.sampleRate;
15
- let Vosk = await import('@echogarden/vosk');
16
- Vosk.setLogLevel(-1);
17
- const model = await new Vosk.Model(modelPath);
18
- const recognizer = new Vosk.Recognizer({ model, sampleRate });
19
- recognizer.setMaxAlternatives(0);
20
- recognizer.setWords(true);
21
- recognizer.setPartialWords(true);
22
- logger.start('Recognize with vosk');
23
- const recognitionStartTimestamp = logger.getTimestamp();
24
- const pcmAudio = AudioBufferConversion.encodeToAudioBuffer(audioChannels, 16);
25
- const trailingSilence = new Uint8Array(sampleRate * 4);
26
- const pcmAudioWithTrailingSilence = concatUint8Arrays([pcmAudio, trailingSilence]);
27
- const pcmAudioByteCount = pcmAudioWithTrailingSilence.length;
28
- const maxChunkSize = sampleRate * 2.0;
29
- let previousResultText = '';
30
- for (let readOffset = 0; readOffset < pcmAudioByteCount; readOffset += maxChunkSize) {
31
- const chunkSize = Math.min(maxChunkSize, pcmAudioByteCount - readOffset);
32
- const chunk = pcmAudioWithTrailingSilence.subarray(readOffset, readOffset + chunkSize);
33
- const speechEnded = await recognizer.acceptWaveformAsync(chunk);
34
- if (verbose) {
35
- const partialResultText = recognizer.partialResult().partial;
36
- if (partialResultText != previousResultText) {
37
- //logger.log(partialResultText)
38
- //logger.log('')
39
- previousResultText = partialResultText;
40
- }
41
- }
42
- }
43
- //const speechEnded = await recognizer.acceptWaveformAsync(pcmAudioWithTrailingSilence)
44
- const result = recognizer.finalResult();
45
- recognizer.reset();
46
- recognizer.free();
47
- model.free();
48
- const transcript = result.text;
49
- const events = result.result;
50
- if (events.length == 0) {
51
- return { transcript, timeline: [] };
52
- }
53
- const timeline = [];
54
- for (let i = 0; i < events.length; i++) {
55
- const event = events[i];
56
- const eventText = event.word;
57
- const eventStart = event.start;
58
- const eventEnd = event.end;
59
- const eventConfidence = event.conf;
60
- timeline.push({
61
- type: 'word',
62
- text: eventText,
63
- startTime: eventStart,
64
- endTime: eventEnd,
65
- confidence: eventConfidence
66
- });
67
- }
68
- //logger.logDuration(`Recognition with vosk`, recognitionStartTimestamp)
69
- logger.end();
70
- return { transcript, timeline };
71
- }
72
- //# sourceMappingURL=VoskSTT.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoskSTT.js","sourceRoot":"","sources":["../../src/recognition/VoskSTT.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,qBAAqB,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAI1E,MAAM,GAAG,GAAG,WAAW,CAAA;AAEvB,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,QAAgB,EAAE,SAAiB,EAAE,OAAO,GAAG,IAAI;IACtF,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA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AI,CAAC,EAAE,CAAC;QACxB,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,CAAqB,CAAA;IACpE,CAAC;SAAM,CAAC;QACP,SAAS,GAAG,OAAO,CAAA;IACpB,CAAC;IAED,OAAO,SAA6B,CAAA;AACrC,CAAC;AAqFD,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IAC1D,KAAK,EAAE,SAAS;IAChB,cAAc,EAAE,SAAS;IAEzB,KAAK,EAAE,SAAS;IAEhB,WAAW,EAAE,CAAC;IACd,UAAU,EAAE,CAAC;IACb,SAAS,EAAE,SAAS;IAEpB,iBAAiB,EAAE,CAAC;IACpB,SAAS,EAAE,CAAC;IACZ,mBAAmB,EAAE,GAAG;IAExB,WAAW,EAAE,CAAC;IACd,oBAAoB,EAAE,GAAG;IAEzB,MAAM,EAAE,SAAS;IAEjB,SAAS,EAAE,KAAK;IAChB,oBAAoB,EAAE,KAAK;IAE3B,OAAO,EAAE,KAAK;CACd,CAAA"}
@@ -1,11 +0,0 @@
1
- import { SynthesisVoice } from '../api/API.js';
2
- import { Timeline } from '../utilities/Timeline.js';
3
- export declare function synthesizeLongText(text: string, voice: string, languageCode: string, sentenceEndPause?: number, segmentEndPause?: number): Promise<{
4
- rawAudio: {
5
- audioChannels: Float32Array<ArrayBufferLike>[];
6
- sampleRate: number;
7
- };
8
- timeline: Timeline;
9
- }>;
10
- export declare function synthesizeFragment(text: string, voice: string): Promise<Uint8Array<ArrayBuffer>>;
11
- export declare const voiceList: SynthesisVoice[];