speechflow 1.4.2 → 1.4.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/CHANGELOG.md +19 -0
- package/etc/stx.conf +17 -11
- package/package.json +7 -4
- package/speechflow-cli/dst/speechflow-node-a2a-ffmpeg.d.ts +13 -0
- package/speechflow-cli/dst/speechflow-node-a2a-ffmpeg.js +153 -0
- package/speechflow-cli/dst/speechflow-node-a2a-ffmpeg.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-a2a-gender.d.ts +20 -0
- package/speechflow-cli/dst/speechflow-node-a2a-gender.js +349 -0
- package/speechflow-cli/dst/speechflow-node-a2a-gender.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-a2a-meter.d.ts +16 -0
- package/speechflow-cli/dst/speechflow-node-a2a-meter.js +232 -0
- package/speechflow-cli/dst/speechflow-node-a2a-meter.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-a2a-mute.d.ts +17 -0
- package/speechflow-cli/dst/speechflow-node-a2a-mute.js +117 -0
- package/speechflow-cli/dst/speechflow-node-a2a-mute.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-a2a-vad.d.ts +19 -0
- package/speechflow-cli/dst/speechflow-node-a2a-vad.js +374 -0
- package/speechflow-cli/dst/speechflow-node-a2a-vad.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-a2a-wav.d.ts +11 -0
- package/speechflow-cli/dst/speechflow-node-a2a-wav.js +211 -0
- package/speechflow-cli/dst/speechflow-node-a2a-wav.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-a2t-deepgram.d.ts +19 -0
- package/speechflow-cli/dst/speechflow-node-a2t-deepgram.js +328 -0
- package/speechflow-cli/dst/speechflow-node-a2t-deepgram.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2a-elevenlabs.d.ts +18 -0
- package/speechflow-cli/dst/speechflow-node-t2a-elevenlabs.js +238 -0
- package/speechflow-cli/dst/speechflow-node-t2a-elevenlabs.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2a-kokoro.d.ts +14 -0
- package/speechflow-cli/dst/speechflow-node-t2a-kokoro.js +155 -0
- package/speechflow-cli/dst/speechflow-node-t2a-kokoro.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2t-deepl.d.ts +15 -0
- package/speechflow-cli/dst/speechflow-node-t2t-deepl.js +146 -0
- package/speechflow-cli/dst/speechflow-node-t2t-deepl.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2t-format.d.ts +11 -0
- package/speechflow-cli/dst/speechflow-node-t2t-format.js +82 -0
- package/speechflow-cli/dst/speechflow-node-t2t-format.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2t-ollama.d.ts +13 -0
- package/speechflow-cli/dst/speechflow-node-t2t-ollama.js +247 -0
- package/speechflow-cli/dst/speechflow-node-t2t-ollama.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2t-openai.d.ts +13 -0
- package/speechflow-cli/dst/speechflow-node-t2t-openai.js +227 -0
- package/speechflow-cli/dst/speechflow-node-t2t-openai.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2t-sentence.d.ts +17 -0
- package/speechflow-cli/dst/speechflow-node-t2t-sentence.js +250 -0
- package/speechflow-cli/dst/speechflow-node-t2t-sentence.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2t-subtitle.d.ts +13 -0
- package/speechflow-cli/dst/speechflow-node-t2t-subtitle.js +278 -0
- package/speechflow-cli/dst/speechflow-node-t2t-subtitle.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-t2t-transformers.d.ts +14 -0
- package/speechflow-cli/dst/speechflow-node-t2t-transformers.js +265 -0
- package/speechflow-cli/dst/speechflow-node-t2t-transformers.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-x2x-filter.d.ts +11 -0
- package/speechflow-cli/dst/speechflow-node-x2x-filter.js +121 -0
- package/speechflow-cli/dst/speechflow-node-x2x-filter.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-x2x-trace.d.ts +11 -0
- package/speechflow-cli/dst/speechflow-node-x2x-trace.js +111 -0
- package/speechflow-cli/dst/speechflow-node-x2x-trace.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-xio-device.d.ts +13 -0
- package/speechflow-cli/dst/speechflow-node-xio-device.js +230 -0
- package/speechflow-cli/dst/speechflow-node-xio-device.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-xio-file.d.ts +11 -0
- package/speechflow-cli/dst/speechflow-node-xio-file.js +216 -0
- package/speechflow-cli/dst/speechflow-node-xio-file.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-xio-mqtt.d.ts +13 -0
- package/speechflow-cli/dst/speechflow-node-xio-mqtt.js +188 -0
- package/speechflow-cli/dst/speechflow-node-xio-mqtt.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node-xio-websocket.d.ts +13 -0
- package/speechflow-cli/dst/speechflow-node-xio-websocket.js +278 -0
- package/speechflow-cli/dst/speechflow-node-xio-websocket.js.map +1 -0
- package/speechflow-cli/dst/speechflow-node.d.ts +65 -0
- package/speechflow-cli/dst/speechflow-node.js +180 -0
- package/speechflow-cli/dst/speechflow-node.js.map +1 -0
- package/speechflow-cli/dst/speechflow-utils.d.ts +74 -0
- package/speechflow-cli/dst/speechflow-utils.js +519 -0
- package/speechflow-cli/dst/speechflow-utils.js.map +1 -0
- package/speechflow-cli/dst/speechflow.d.ts +7 -0
- package/speechflow-cli/dst/speechflow.js +837 -0
- package/speechflow-cli/dst/speechflow.js.map +1 -0
- package/speechflow-cli/etc/stx.conf +13 -13
- package/speechflow-cli/package.json +7 -7
- package/speechflow-cli/src/speechflow.ts +5 -5
- package/speechflow-ui-db/dst/app-font-TypoPRO-SourceSansPro-Bold.eot +0 -0
- package/speechflow-ui-db/dst/app-font-TypoPRO-SourceSansPro-Bold.ttf +0 -0
- package/speechflow-ui-db/dst/app-font-TypoPRO-SourceSansPro-Bold.woff +0 -0
- package/speechflow-ui-db/dst/app-font-TypoPRO-SourceSansPro-Regular.eot +0 -0
- package/speechflow-ui-db/dst/app-font-TypoPRO-SourceSansPro-Regular.ttf +0 -0
- package/speechflow-ui-db/dst/app-font-TypoPRO-SourceSansPro-Regular.woff +0 -0
- package/speechflow-ui-db/dst/app-font-fa-brands-400.woff2 +0 -0
- package/speechflow-ui-db/dst/app-font-fa-regular-400.woff2 +0 -0
- package/speechflow-ui-db/dst/app-font-fa-solid-900.woff2 +0 -0
- package/speechflow-ui-db/dst/app-font-fa-v4compatibility.woff2 +0 -0
- package/speechflow-ui-db/dst/app-icon.svg +26 -0
- package/speechflow-ui-db/dst/index.css +5 -0
- package/speechflow-ui-db/dst/index.html +24 -0
- package/speechflow-ui-db/dst/index.js +616 -0
- package/speechflow-ui-db/etc/stx.conf +17 -17
- package/speechflow-ui-db/package.json +2 -2
- package/speechflow-ui-db/src/app.vue +14 -7
- package/speechflow-ui-st/dst/app-font-TypoPRO-SourceSansPro-Bold.eot +0 -0
- package/speechflow-ui-st/dst/app-font-TypoPRO-SourceSansPro-Bold.ttf +0 -0
- package/speechflow-ui-st/dst/app-font-TypoPRO-SourceSansPro-Bold.woff +0 -0
- package/speechflow-ui-st/dst/app-font-TypoPRO-SourceSansPro-Regular.eot +0 -0
- package/speechflow-ui-st/dst/app-font-TypoPRO-SourceSansPro-Regular.ttf +0 -0
- package/speechflow-ui-st/dst/app-font-TypoPRO-SourceSansPro-Regular.woff +0 -0
- package/speechflow-ui-st/dst/app-font-fa-brands-400.woff2 +0 -0
- package/speechflow-ui-st/dst/app-font-fa-regular-400.woff2 +0 -0
- package/speechflow-ui-st/dst/app-font-fa-solid-900.woff2 +0 -0
- package/speechflow-ui-st/dst/app-font-fa-v4compatibility.woff2 +0 -0
- package/speechflow-ui-st/dst/app-icon.svg +26 -0
- package/speechflow-ui-st/dst/index.css +5 -0
- package/speechflow-ui-st/dst/index.html +24 -0
- package/speechflow-ui-st/dst/index.js +610 -0
- package/speechflow-ui-st/etc/stx.conf +17 -17
- package/speechflow-ui-st/package.json +2 -2
- /package/{speechflow-cli/etc → etc}/speechflow.yaml +0 -0
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
** SpeechFlow - Speech Processing Flow Graph
|
|
4
|
+
** Copyright (c) 2024-2025 Dr. Ralf S. Engelschall <rse@engelschall.com>
|
|
5
|
+
** Licensed under GPL 3.0 <https://spdx.org/licenses/GPL-3.0-only>
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.TimeStore = exports.StreamWrapper = exports.Queue = exports.QueuePointer = exports.DoubleQueue = exports.SingleQueue = void 0;
|
|
45
|
+
exports.audioBufferDuration = audioBufferDuration;
|
|
46
|
+
exports.audioArrayDuration = audioArrayDuration;
|
|
47
|
+
exports.convertBufToF32 = convertBufToF32;
|
|
48
|
+
exports.convertF32ToBuf = convertF32ToBuf;
|
|
49
|
+
exports.createTransformStreamForWritableSide = createTransformStreamForWritableSide;
|
|
50
|
+
exports.createTransformStreamForReadableSide = createTransformStreamForReadableSide;
|
|
51
|
+
exports.ensureStreamChunk = ensureStreamChunk;
|
|
52
|
+
exports.streamChunkEncode = streamChunkEncode;
|
|
53
|
+
exports.streamChunkDecode = streamChunkDecode;
|
|
54
|
+
/* standard dependencies */
|
|
55
|
+
const node_stream_1 = __importDefault(require("node:stream"));
|
|
56
|
+
const node_events_1 = require("node:events");
|
|
57
|
+
/* external dependencies */
|
|
58
|
+
const luxon_1 = require("luxon");
|
|
59
|
+
const cbor2_1 = __importDefault(require("cbor2"));
|
|
60
|
+
const IntervalTree = __importStar(require("node-interval-tree"));
|
|
61
|
+
/* internal dependencies */
|
|
62
|
+
const speechflow_node_1 = require("./speechflow-node");
|
|
63
|
+
/* calculate duration of an audio buffer */
|
|
64
|
+
function audioBufferDuration(buffer, sampleRate = 48000, bitDepth = 16, channels = 1, littleEndian = true) {
|
|
65
|
+
/* sanity check parameters */
|
|
66
|
+
if (!Buffer.isBuffer(buffer))
|
|
67
|
+
throw new Error("invalid input (Buffer expected)");
|
|
68
|
+
if (littleEndian !== true)
|
|
69
|
+
throw new Error("only Little Endian supported");
|
|
70
|
+
if (sampleRate <= 0)
|
|
71
|
+
throw new Error("sample rate must be positive");
|
|
72
|
+
if (bitDepth <= 0 || bitDepth % 8 !== 0)
|
|
73
|
+
throw new Error("bit depth must be positive and multiple of 8");
|
|
74
|
+
if (channels <= 0)
|
|
75
|
+
throw new Error("channels must be positive");
|
|
76
|
+
/* calculate duration */
|
|
77
|
+
const bytesPerSample = bitDepth / 8;
|
|
78
|
+
const totalSamples = buffer.length / (bytesPerSample * channels);
|
|
79
|
+
return totalSamples / sampleRate;
|
|
80
|
+
}
|
|
81
|
+
/* calculate duration of an audio array */
|
|
82
|
+
function audioArrayDuration(arr, sampleRate = 48000, channels = 1) {
|
|
83
|
+
/* sanity check parameters */
|
|
84
|
+
if (arr.length === 0)
|
|
85
|
+
return 0;
|
|
86
|
+
if (sampleRate <= 0)
|
|
87
|
+
throw new Error("sample rate must be positive");
|
|
88
|
+
if (channels <= 0)
|
|
89
|
+
throw new Error("channels must be positive");
|
|
90
|
+
/* calculate duration */
|
|
91
|
+
const totalSamples = arr.length / channels;
|
|
92
|
+
return totalSamples / sampleRate;
|
|
93
|
+
}
|
|
94
|
+
/* helper function: convert Buffer in PCM/I16 to Float32Array in PCM/F32 format */
|
|
95
|
+
function convertBufToF32(buf, littleEndian = true) {
|
|
96
|
+
if (buf.length % 2 !== 0)
|
|
97
|
+
throw new Error("buffer length must be even for 16-bit samples");
|
|
98
|
+
const dataView = new DataView(buf.buffer);
|
|
99
|
+
const arr = new Float32Array(buf.length / 2);
|
|
100
|
+
for (let i = 0; i < arr.length; i++)
|
|
101
|
+
arr[i] = dataView.getInt16(i * 2, littleEndian) / 32768;
|
|
102
|
+
return arr;
|
|
103
|
+
}
|
|
104
|
+
/* helper function: convert Float32Array in PCM/F32 to Buffer in PCM/I16 format */
|
|
105
|
+
function convertF32ToBuf(arr) {
|
|
106
|
+
if (arr.length === 0)
|
|
107
|
+
return Buffer.alloc(0);
|
|
108
|
+
const int16Array = new Int16Array(arr.length);
|
|
109
|
+
for (let i = 0; i < arr.length; i++) {
|
|
110
|
+
let sample = arr[i];
|
|
111
|
+
if (Number.isNaN(sample))
|
|
112
|
+
sample = 0;
|
|
113
|
+
int16Array[i] = Math.max(-32768, Math.min(32767, Math.round(sample * 32768)));
|
|
114
|
+
}
|
|
115
|
+
return Buffer.from(int16Array.buffer);
|
|
116
|
+
}
|
|
117
|
+
/* create a Duplex/Transform stream which has
|
|
118
|
+
object-mode on Writable side and buffer/string-mode on Readable side */
|
|
119
|
+
function createTransformStreamForWritableSide() {
|
|
120
|
+
return new node_stream_1.default.Transform({
|
|
121
|
+
readableObjectMode: true,
|
|
122
|
+
writableObjectMode: true,
|
|
123
|
+
decodeStrings: false,
|
|
124
|
+
highWaterMark: 1,
|
|
125
|
+
transform(chunk, encoding, callback) {
|
|
126
|
+
this.push(chunk.payload);
|
|
127
|
+
callback();
|
|
128
|
+
},
|
|
129
|
+
final(callback) {
|
|
130
|
+
this.push(null);
|
|
131
|
+
callback();
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/* create a Duplex/Transform stream which has
|
|
136
|
+
object-mode on Readable side and buffer/string-mode on Writable side */
|
|
137
|
+
function createTransformStreamForReadableSide(type, getTimeZero) {
|
|
138
|
+
return new node_stream_1.default.Transform({
|
|
139
|
+
readableObjectMode: true,
|
|
140
|
+
writableObjectMode: true,
|
|
141
|
+
decodeStrings: false,
|
|
142
|
+
highWaterMark: (type === "audio" ? 19200 : 65536),
|
|
143
|
+
transform(chunk, encoding, callback) {
|
|
144
|
+
const timeZero = getTimeZero();
|
|
145
|
+
const start = luxon_1.DateTime.now().diff(timeZero);
|
|
146
|
+
let end = start;
|
|
147
|
+
if (type === "audio") {
|
|
148
|
+
const duration = audioBufferDuration(chunk);
|
|
149
|
+
end = start.plus(duration * 1000);
|
|
150
|
+
}
|
|
151
|
+
const obj = new speechflow_node_1.SpeechFlowChunk(start, end, "final", type, chunk);
|
|
152
|
+
this.push(obj);
|
|
153
|
+
callback();
|
|
154
|
+
},
|
|
155
|
+
final(callback) {
|
|
156
|
+
this.push(null);
|
|
157
|
+
callback();
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/* ensure a chunk is of a certain type and format */
|
|
162
|
+
function ensureStreamChunk(type, chunk) {
|
|
163
|
+
if (chunk instanceof speechflow_node_1.SpeechFlowChunk) {
|
|
164
|
+
if (chunk.type !== type)
|
|
165
|
+
throw new Error(`invalid payload chunk (expected ${type} type, received ${chunk.type} type)`);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
if (type === "text" && Buffer.isBuffer(chunk))
|
|
169
|
+
chunk = chunk.toString("utf8");
|
|
170
|
+
else if (type === "audio" && !Buffer.isBuffer(chunk))
|
|
171
|
+
chunk = Buffer.from(chunk);
|
|
172
|
+
}
|
|
173
|
+
return chunk;
|
|
174
|
+
}
|
|
175
|
+
/* encode/serialize chunk of data */
|
|
176
|
+
function streamChunkEncode(chunk) {
|
|
177
|
+
let payload;
|
|
178
|
+
if (Buffer.isBuffer(chunk.payload))
|
|
179
|
+
payload = new Uint8Array(chunk.payload);
|
|
180
|
+
else {
|
|
181
|
+
const encoder = new TextEncoder();
|
|
182
|
+
payload = encoder.encode(chunk.payload);
|
|
183
|
+
}
|
|
184
|
+
const data = {
|
|
185
|
+
timestampStart: chunk.timestampStart.toMillis(),
|
|
186
|
+
timestampEnd: chunk.timestampEnd.toMillis(),
|
|
187
|
+
kind: chunk.kind,
|
|
188
|
+
type: chunk.type,
|
|
189
|
+
payload
|
|
190
|
+
};
|
|
191
|
+
const _data = cbor2_1.default.encode(data);
|
|
192
|
+
return _data;
|
|
193
|
+
}
|
|
194
|
+
/* decode/unserialize chunk of data */
|
|
195
|
+
function streamChunkDecode(_data) {
|
|
196
|
+
let data;
|
|
197
|
+
try {
|
|
198
|
+
data = cbor2_1.default.decode(_data);
|
|
199
|
+
}
|
|
200
|
+
catch (err) {
|
|
201
|
+
throw new Error(`CBOR decoding failed: ${err}`);
|
|
202
|
+
}
|
|
203
|
+
let payload;
|
|
204
|
+
if (data.type === "audio")
|
|
205
|
+
payload = Buffer.from(data.payload);
|
|
206
|
+
else
|
|
207
|
+
payload = (new TextDecoder()).decode(data.payload);
|
|
208
|
+
const chunk = new speechflow_node_1.SpeechFlowChunk(luxon_1.Duration.fromMillis(data.timestampStart), luxon_1.Duration.fromMillis(data.timestampEnd), data.kind, data.type, payload);
|
|
209
|
+
return chunk;
|
|
210
|
+
}
|
|
211
|
+
/* helper class for single item queue */
|
|
212
|
+
class SingleQueue extends node_events_1.EventEmitter {
|
|
213
|
+
queue = new Array();
|
|
214
|
+
write(item) {
|
|
215
|
+
this.queue.unshift(item);
|
|
216
|
+
this.emit("dequeue");
|
|
217
|
+
}
|
|
218
|
+
read() {
|
|
219
|
+
return new Promise((resolve, reject) => {
|
|
220
|
+
const consume = () => {
|
|
221
|
+
if (this.queue.length > 0)
|
|
222
|
+
return this.queue.pop();
|
|
223
|
+
else
|
|
224
|
+
return null;
|
|
225
|
+
};
|
|
226
|
+
let item = consume();
|
|
227
|
+
if (item !== null)
|
|
228
|
+
resolve(item);
|
|
229
|
+
else {
|
|
230
|
+
const tryToConsume = () => {
|
|
231
|
+
item = consume();
|
|
232
|
+
if (item !== null)
|
|
233
|
+
resolve(item);
|
|
234
|
+
else
|
|
235
|
+
this.once("dequeue", tryToConsume);
|
|
236
|
+
};
|
|
237
|
+
this.once("dequeue", tryToConsume);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
exports.SingleQueue = SingleQueue;
|
|
243
|
+
/* helper class for double-item queue */
|
|
244
|
+
class DoubleQueue extends node_events_1.EventEmitter {
|
|
245
|
+
queue0 = new Array();
|
|
246
|
+
queue1 = new Array();
|
|
247
|
+
notify() {
|
|
248
|
+
if (this.queue0.length > 0 && this.queue1.length > 0)
|
|
249
|
+
this.emit("dequeue");
|
|
250
|
+
}
|
|
251
|
+
write0(item) {
|
|
252
|
+
this.queue0.unshift(item);
|
|
253
|
+
this.notify();
|
|
254
|
+
}
|
|
255
|
+
write1(item) {
|
|
256
|
+
this.queue1.unshift(item);
|
|
257
|
+
this.notify();
|
|
258
|
+
}
|
|
259
|
+
read() {
|
|
260
|
+
return new Promise((resolve, reject) => {
|
|
261
|
+
const consume = () => {
|
|
262
|
+
if (this.queue0.length > 0 && this.queue1.length > 0) {
|
|
263
|
+
const item0 = this.queue0.pop();
|
|
264
|
+
const item1 = this.queue1.pop();
|
|
265
|
+
return [item0, item1];
|
|
266
|
+
}
|
|
267
|
+
else
|
|
268
|
+
return null;
|
|
269
|
+
};
|
|
270
|
+
let items = consume();
|
|
271
|
+
if (items !== null)
|
|
272
|
+
resolve(items);
|
|
273
|
+
else {
|
|
274
|
+
const tryToConsume = () => {
|
|
275
|
+
items = consume();
|
|
276
|
+
if (items !== null)
|
|
277
|
+
resolve(items);
|
|
278
|
+
else
|
|
279
|
+
this.once("dequeue", tryToConsume);
|
|
280
|
+
};
|
|
281
|
+
this.once("dequeue", tryToConsume);
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
exports.DoubleQueue = DoubleQueue;
|
|
287
|
+
/* queue pointer */
|
|
288
|
+
class QueuePointer extends node_events_1.EventEmitter {
|
|
289
|
+
name;
|
|
290
|
+
queue;
|
|
291
|
+
/* internal state */
|
|
292
|
+
index = 0;
|
|
293
|
+
/* construction */
|
|
294
|
+
constructor(name, queue) {
|
|
295
|
+
super();
|
|
296
|
+
this.name = name;
|
|
297
|
+
this.queue = queue;
|
|
298
|
+
this.setMaxListeners(100);
|
|
299
|
+
}
|
|
300
|
+
/* positioning operations */
|
|
301
|
+
maxPosition() {
|
|
302
|
+
return this.queue.elements.length;
|
|
303
|
+
}
|
|
304
|
+
position(index) {
|
|
305
|
+
if (index !== undefined) {
|
|
306
|
+
this.index = Math.max(0, Math.min(index, this.queue.elements.length));
|
|
307
|
+
this.emit("position", this.index);
|
|
308
|
+
}
|
|
309
|
+
return this.index;
|
|
310
|
+
}
|
|
311
|
+
walk(num) {
|
|
312
|
+
const indexOld = this.index;
|
|
313
|
+
if (num > 0)
|
|
314
|
+
this.index = Math.min(this.index + num, this.queue.elements.length);
|
|
315
|
+
else if (num < 0)
|
|
316
|
+
this.index = Math.max(this.index + num, 0);
|
|
317
|
+
if (this.index !== indexOld)
|
|
318
|
+
this.emit("position", { start: this.index });
|
|
319
|
+
}
|
|
320
|
+
walkForwardUntil(type) {
|
|
321
|
+
while (this.index < this.queue.elements.length
|
|
322
|
+
&& this.queue.elements[this.index].type !== type)
|
|
323
|
+
this.index++;
|
|
324
|
+
this.emit("position", { start: this.index });
|
|
325
|
+
}
|
|
326
|
+
walkBackwardUntil(type) {
|
|
327
|
+
while (this.index > 0
|
|
328
|
+
&& this.queue.elements[this.index].type !== type)
|
|
329
|
+
this.index--;
|
|
330
|
+
this.emit("position", { start: this.index });
|
|
331
|
+
}
|
|
332
|
+
/* search operations */
|
|
333
|
+
searchForward(type) {
|
|
334
|
+
let position = this.index;
|
|
335
|
+
while (position < this.queue.elements.length
|
|
336
|
+
&& this.queue.elements[position].type !== type)
|
|
337
|
+
position++;
|
|
338
|
+
this.emit("search", { start: this.index, end: position });
|
|
339
|
+
return position;
|
|
340
|
+
}
|
|
341
|
+
searchBackward(type) {
|
|
342
|
+
let position = this.index;
|
|
343
|
+
while (position > 0
|
|
344
|
+
&& this.queue.elements[position].type !== type)
|
|
345
|
+
position--;
|
|
346
|
+
this.emit("search", { start: position, end: this.index });
|
|
347
|
+
return position;
|
|
348
|
+
}
|
|
349
|
+
/* reading operations */
|
|
350
|
+
peek(position) {
|
|
351
|
+
if (position === undefined)
|
|
352
|
+
position = this.index;
|
|
353
|
+
position = Math.max(0, Math.min(position, this.queue.elements.length));
|
|
354
|
+
const element = this.queue.elements[position];
|
|
355
|
+
this.queue.emit("read", { start: position, end: position });
|
|
356
|
+
return element;
|
|
357
|
+
}
|
|
358
|
+
read() {
|
|
359
|
+
const element = this.queue.elements[this.index];
|
|
360
|
+
if (this.index < this.queue.elements.length)
|
|
361
|
+
this.index++;
|
|
362
|
+
this.queue.emit("read", { start: this.index - 1, end: this.index - 1 });
|
|
363
|
+
return element;
|
|
364
|
+
}
|
|
365
|
+
slice(size) {
|
|
366
|
+
let slice;
|
|
367
|
+
const start = this.index;
|
|
368
|
+
if (size !== undefined) {
|
|
369
|
+
size = Math.max(0, Math.min(size, this.queue.elements.length - this.index));
|
|
370
|
+
slice = this.queue.elements.slice(this.index, this.index + size);
|
|
371
|
+
this.index += size;
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
slice = this.queue.elements.slice(this.index);
|
|
375
|
+
this.index = this.queue.elements.length;
|
|
376
|
+
}
|
|
377
|
+
this.queue.emit("read", { start, end: this.index });
|
|
378
|
+
return slice;
|
|
379
|
+
}
|
|
380
|
+
/* writing operations */
|
|
381
|
+
touch() {
|
|
382
|
+
if (this.index >= this.queue.elements.length)
|
|
383
|
+
throw new Error("cannot touch after last element");
|
|
384
|
+
this.queue.emit("write", { start: this.index, end: this.index + 1 });
|
|
385
|
+
}
|
|
386
|
+
append(element) {
|
|
387
|
+
this.queue.elements.push(element);
|
|
388
|
+
this.index = this.queue.elements.length;
|
|
389
|
+
this.queue.emit("write", { start: this.index - 1, end: this.index - 1 });
|
|
390
|
+
}
|
|
391
|
+
insert(element) {
|
|
392
|
+
this.queue.elements.splice(this.index, 0, element);
|
|
393
|
+
this.queue.emit("write", { start: this.index - 1, end: this.index });
|
|
394
|
+
}
|
|
395
|
+
delete() {
|
|
396
|
+
if (this.index >= this.queue.elements.length)
|
|
397
|
+
throw new Error("cannot delete after last element");
|
|
398
|
+
this.queue.elements.splice(this.index, 1);
|
|
399
|
+
this.queue.emit("write", { start: this.index, end: this.index });
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
exports.QueuePointer = QueuePointer;
|
|
403
|
+
/* queue */
|
|
404
|
+
class Queue extends node_events_1.EventEmitter {
|
|
405
|
+
elements = [];
|
|
406
|
+
pointers = new Map();
|
|
407
|
+
constructor() {
|
|
408
|
+
super();
|
|
409
|
+
this.setMaxListeners(100);
|
|
410
|
+
}
|
|
411
|
+
pointerUse(name) {
|
|
412
|
+
if (!this.pointers.has(name))
|
|
413
|
+
this.pointers.set(name, new QueuePointer(name, this));
|
|
414
|
+
return this.pointers.get(name);
|
|
415
|
+
}
|
|
416
|
+
pointerDelete(name) {
|
|
417
|
+
if (!this.pointers.has(name))
|
|
418
|
+
throw new Error("pointer not exists");
|
|
419
|
+
this.pointers.delete(name);
|
|
420
|
+
}
|
|
421
|
+
trim() {
|
|
422
|
+
/* determine minimum pointer position */
|
|
423
|
+
let min = this.elements.length;
|
|
424
|
+
for (const pointer of this.pointers.values())
|
|
425
|
+
if (min > pointer.position())
|
|
426
|
+
min = pointer.position();
|
|
427
|
+
/* trim the maximum amount of first elements */
|
|
428
|
+
if (min > 0) {
|
|
429
|
+
this.elements.splice(0, min);
|
|
430
|
+
/* shift all pointers */
|
|
431
|
+
for (const pointer of this.pointers.values())
|
|
432
|
+
pointer.position(pointer.position() - min);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
exports.Queue = Queue;
|
|
437
|
+
/* utility class for wrapping a custom stream into a regular Transform stream */
|
|
438
|
+
class StreamWrapper extends node_stream_1.default.Transform {
|
|
439
|
+
foreignStream;
|
|
440
|
+
onData = (chunk) => { this.push(chunk); };
|
|
441
|
+
onError = (err) => { this.emit("error", err); };
|
|
442
|
+
onEnd = () => { this.push(null); };
|
|
443
|
+
constructor(foreignStream, options = {}) {
|
|
444
|
+
options.readableObjectMode = true;
|
|
445
|
+
options.writableObjectMode = true;
|
|
446
|
+
super(options);
|
|
447
|
+
this.foreignStream = foreignStream;
|
|
448
|
+
if (typeof this.foreignStream.on === "function") {
|
|
449
|
+
this.foreignStream.on("data", this.onData);
|
|
450
|
+
this.foreignStream.on("error", this.onError);
|
|
451
|
+
this.foreignStream.on("end", this.onEnd);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
_transform(chunk, encoding, callback) {
|
|
455
|
+
if (this.destroyed) {
|
|
456
|
+
callback(new Error("stream already destroyed"));
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
try {
|
|
460
|
+
if (typeof this.foreignStream.write === "function") {
|
|
461
|
+
const canContinue = this.foreignStream.write(chunk);
|
|
462
|
+
if (canContinue)
|
|
463
|
+
callback();
|
|
464
|
+
else
|
|
465
|
+
this.foreignStream.once("drain", callback);
|
|
466
|
+
}
|
|
467
|
+
else
|
|
468
|
+
throw new Error("foreign stream lacks write method");
|
|
469
|
+
}
|
|
470
|
+
catch (err) {
|
|
471
|
+
callback(err);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
_flush(callback) {
|
|
475
|
+
if (this.destroyed) {
|
|
476
|
+
callback(new Error("stream already destroyed"));
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
try {
|
|
480
|
+
if (typeof this.foreignStream.end === "function")
|
|
481
|
+
this.foreignStream.end();
|
|
482
|
+
callback();
|
|
483
|
+
}
|
|
484
|
+
catch (err) {
|
|
485
|
+
callback(err);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
_destroy(error, callback) {
|
|
489
|
+
if (typeof this.foreignStream.removeListener === "function") {
|
|
490
|
+
this.foreignStream.removeListener("data", this.onData);
|
|
491
|
+
this.foreignStream.removeListener("error", this.onError);
|
|
492
|
+
this.foreignStream.removeListener("end", this.onEnd);
|
|
493
|
+
}
|
|
494
|
+
super._destroy(error, callback);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
exports.StreamWrapper = StreamWrapper;
|
|
498
|
+
class TimeStore extends node_events_1.EventEmitter {
|
|
499
|
+
tree = new IntervalTree.IntervalTree();
|
|
500
|
+
store(start, end, item) {
|
|
501
|
+
this.tree.insert({ low: start.toMillis(), high: end.toMillis(), item });
|
|
502
|
+
}
|
|
503
|
+
fetch(start, end) {
|
|
504
|
+
const intervals = this.tree.search(start.toMillis(), end.toMillis());
|
|
505
|
+
return intervals.map((interval) => interval.item);
|
|
506
|
+
}
|
|
507
|
+
prune(_before) {
|
|
508
|
+
const before = _before.toMillis();
|
|
509
|
+
const intervals = this.tree.search(0, before - 1);
|
|
510
|
+
for (const interval of intervals)
|
|
511
|
+
if (interval.low < before && interval.high < before)
|
|
512
|
+
this.tree.remove(interval);
|
|
513
|
+
}
|
|
514
|
+
clear() {
|
|
515
|
+
this.tree = new IntervalTree.IntervalTree();
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
exports.TimeStore = TimeStore;
|
|
519
|
+
//# sourceMappingURL=speechflow-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speechflow-utils.js","sourceRoot":"","sources":["../src/speechflow-utils.ts"],"names":[],"mappings":";AAAA;;;;EAIE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeF,kDAuBC;AAGD,gDAgBC;AAGD,0CAQC;AAGD,0CAWC;AAID,oFAeC;AAID,oFAuBC;AAGD,8CAYC;AAYD,8CAiBC;AAGD,8CAqBC;AAlMD,6BAA6B;AAC7B,8DAAgD;AAChD,6CAAgD;AAEhD,6BAA6B;AAC7B,iCAA0C;AAC1C,kDAA0C;AAC1C,iEAAuD;AAEvD,6BAA6B;AAC7B,uDAAsD;AAEtD,6CAA6C;AAC7C,SAAgB,mBAAmB,CAC/B,MAAc,EACd,UAAU,GAAK,KAAK,EACpB,QAAQ,GAAO,EAAE,EACjB,QAAQ,GAAO,CAAC,EAChB,YAAY,GAAG,IAAI;IAEnB,+BAA+B;IAC/B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,iC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