echogarden 1.8.2 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alignment/DTWMfccSequenceAlignment.d.ts +1 -1
- package/dist/alignment/DTWMfccSequenceAlignment.js +6 -5
- package/dist/alignment/DTWMfccSequenceAlignment.js.map +1 -1
- package/dist/alignment/DTWSequenceAlignment.d.ts +1 -1
- package/dist/alignment/DTWSequenceAlignment.js.map +1 -1
- package/dist/alignment/DTWSequenceAlignmentWindowed.d.ts +1 -1
- package/dist/alignment/DTWSequenceAlignmentWindowed.js.map +1 -1
- package/dist/alignment/SpeechAlignment.d.ts +2 -0
- package/dist/alignment/SpeechAlignment.js +1 -1
- package/dist/alignment/SpeechAlignment.js.map +1 -1
- package/dist/api/SpeechSearch.d.ts +6 -0
- package/dist/api/SpeechSearch.js +4 -0
- package/dist/api/SpeechSearch.js.map +1 -0
- package/dist/dsp/MFCC.d.ts +5 -6
- package/dist/dsp/MFCC.js +4 -19
- package/dist/dsp/MFCC.js.map +1 -1
- package/dist/math/MedianFilter.d.ts +2 -2
- package/dist/math/MedianFilter.js +3 -4
- package/dist/math/MedianFilter.js.map +1 -1
- package/dist/math/VectorMath.d.ts +34 -34
- package/dist/math/VectorMath.js +63 -44
- package/dist/math/VectorMath.js.map +1 -1
- package/dist/nlp/IPA.d.ts +3 -3
- package/dist/recognition/WhisperSTT.d.ts +1 -0
- package/dist/recognition/WhisperSTT.js +36 -20
- package/dist/recognition/WhisperSTT.js.map +1 -1
- package/dist/speech-search/DTWSpeechSearch.d.ts +2 -0
- package/dist/speech-search/DTWSpeechSearch.js +18 -0
- package/dist/speech-search/DTWSpeechSearch.js.map +1 -0
- package/dist/utilities/RandomGenerator.d.ts +2 -2
- package/dist/utilities/RandomGenerator.js.map +1 -1
- package/dist/utilities/Utilities.js +7 -1
- package/dist/utilities/Utilities.js.map +1 -1
- package/dist/utilities/WebReader.js +2 -2
- package/dist/utilities/WebReader.js.map +1 -1
- package/docs/Options.md +8 -6
- package/package.json +2 -2
- package/src/alignment/DTWMfccSequenceAlignment.ts +9 -6
- package/src/alignment/DTWSequenceAlignment.ts +2 -2
- package/src/alignment/DTWSequenceAlignmentWindowed.ts +3 -3
- package/src/alignment/SpeechAlignment.ts +1 -1
- package/src/api/SpeechSearch.ts +12 -0
- package/src/dsp/MFCC.ts +11 -31
- package/src/math/MedianFilter.ts +5 -5
- package/src/math/VectorMath.ts +109 -75
- package/src/recognition/WhisperSTT.ts +45 -27
- package/src/speech-search/DTWSpeechSearch.ts +26 -0
- package/src/utilities/RandomGenerator.ts +2 -2
- package/src/utilities/Utilities.ts +11 -3
- package/src/utilities/WebReader.ts +2 -2
|
@@ -255,7 +255,15 @@ export function setupProgramTerminationListeners(cleanupFunc?: () => void) {
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
export function clip(num: number, min: number, max: number) {
|
|
258
|
-
|
|
258
|
+
if (num < min) {
|
|
259
|
+
return min
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (num > max) {
|
|
263
|
+
return max
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return num
|
|
259
267
|
}
|
|
260
268
|
|
|
261
269
|
export function readBinaryIncomingMessage(incomingMessage: IncomingMessage) {
|
|
@@ -413,8 +421,8 @@ export function writeToStdinInChunks(process: ChildProcessWithoutNullStreams, bu
|
|
|
413
421
|
writeChunk(0)
|
|
414
422
|
}
|
|
415
423
|
|
|
416
|
-
export function getIntegerRange(start: number, end: number)
|
|
417
|
-
const result = []
|
|
424
|
+
export function getIntegerRange(start: number, end: number) {
|
|
425
|
+
const result: number[] = []
|
|
418
426
|
|
|
419
427
|
for (let i = start; i < end; i++) {
|
|
420
428
|
result.push(i)
|
|
@@ -7,7 +7,7 @@ import { convertHtmlToText } from './StringUtilities.js'
|
|
|
7
7
|
|
|
8
8
|
export async function fetchDocumentText(url: string) {
|
|
9
9
|
const progressLogger = new Logger()
|
|
10
|
-
progressLogger.start(`
|
|
10
|
+
progressLogger.start(`Fetch ${url}`)
|
|
11
11
|
|
|
12
12
|
const parsedUrl = new URL(url)
|
|
13
13
|
const origin = parsedUrl.origin
|
|
@@ -22,7 +22,7 @@ export async function fetchDocumentText(url: string) {
|
|
|
22
22
|
}),
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
progressLogger.start(`
|
|
25
|
+
progressLogger.start(`Parse document body`)
|
|
26
26
|
|
|
27
27
|
const doc = new JSDOM(response.data, {
|
|
28
28
|
url,
|