@mulingai-npm/redis 3.4.0 → 3.4.1
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.
|
@@ -86,6 +86,7 @@ export declare class MulingstreamChunkManager {
|
|
|
86
86
|
status: StepStatus;
|
|
87
87
|
}>): Promise<MulingstreamChunkData | null>;
|
|
88
88
|
discardStt(roomId: string, n: number): Promise<MulingstreamChunkData | null>;
|
|
89
|
+
updateSttAsUsed(roomId: string, chunkNumber: number): Promise<MulingstreamChunkData | null>;
|
|
89
90
|
updateFinalTranscription(roomId: string, n: number, opt: {
|
|
90
91
|
transcription?: string;
|
|
91
92
|
sttStatus?: StepStatus;
|
|
@@ -216,6 +216,13 @@ class MulingstreamChunkManager {
|
|
|
216
216
|
c.sttStatus = 'DISCARDED';
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
+
async updateSttAsUsed(roomId, chunkNumber) {
|
|
220
|
+
return this.withChunk(roomId, chunkNumber, (chunk) => {
|
|
221
|
+
Object.keys(chunk.stt).forEach((sttProvider) => {
|
|
222
|
+
chunk.stt[sttProvider].status = 'USED';
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
}
|
|
219
226
|
async updateFinalTranscription(roomId, n, opt) {
|
|
220
227
|
return this.withChunk(roomId, n, (c) => {
|
|
221
228
|
if (opt.transcription !== undefined)
|