@mulingai-npm/redis 1.10.1 → 1.11.2
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.
|
@@ -2,8 +2,8 @@ import { RedisClient } from '../redis-client';
|
|
|
2
2
|
export type SttStatus = 'INIT' | 'DISCARDED' | 'READY' | 'USED';
|
|
3
3
|
export type TranslationStatus = 'INIT' | 'DISCARDED' | 'READY' | 'USED';
|
|
4
4
|
export type TtsStatus = 'INIT' | 'DISCARDED' | 'READY' | 'USED';
|
|
5
|
-
export type MulingstreamChunkStatus = 'INIT' | '
|
|
6
|
-
export type MulingstreamChunkStep = 'RECEIVED' | 'STT' | 'TRANSLATION' | 'TTS' | 'EMITTED'
|
|
5
|
+
export type MulingstreamChunkStatus = 'INIT' | 'STARTED' | 'FINISHED' | 'CANCELED' | 'USED';
|
|
6
|
+
export type MulingstreamChunkStep = 'RECEIVED' | 'STT' | 'TRANSLATION' | 'TTS' | 'EMITTED';
|
|
7
7
|
export type SttProvider = 'azure' | 'whisper' | 'google' | 'aws';
|
|
8
8
|
export type MulingstreamChunkData = {
|
|
9
9
|
mulingstreamChunkId: string;
|
|
@@ -65,7 +65,7 @@ export declare class MulingstreamChunkManager {
|
|
|
65
65
|
getMulingstreamChunk(mulingstreamChunkId: string): Promise<MulingstreamChunkData | null>;
|
|
66
66
|
getMulingstreamChunksByRoom(roomId: string): Promise<MulingstreamChunkData[]>;
|
|
67
67
|
getByChunkNumber(chunkNumber: number, roomId: string): Promise<MulingstreamChunkData | null>;
|
|
68
|
-
updateMulingstreamChunkStatus(mulingstreamChunkId: string,
|
|
68
|
+
updateMulingstreamChunkStatus(mulingstreamChunkId: string, mulingstreamChunkStep: MulingstreamChunkStep, mulingstreamChunkStatus: MulingstreamChunkStatus): Promise<boolean>;
|
|
69
69
|
updateFinalTranscription(mulingstreamChunkId: string, finalTranscription: string): Promise<boolean>;
|
|
70
70
|
updateSttStatus(mulingstreamChunkId: string, service: SttProvider, status: SttStatus): Promise<boolean>;
|
|
71
71
|
updateTranscription(mulingstreamChunkId: string, service: SttProvider, transcription: string, sttStatus: SttStatus): Promise<boolean>;
|
|
@@ -148,7 +148,7 @@ class MulingstreamChunkManager {
|
|
|
148
148
|
}
|
|
149
149
|
return this.parseHashData(data);
|
|
150
150
|
}
|
|
151
|
-
async updateMulingstreamChunkStatus(mulingstreamChunkId,
|
|
151
|
+
async updateMulingstreamChunkStatus(mulingstreamChunkId, mulingstreamChunkStep, mulingstreamChunkStatus) {
|
|
152
152
|
// Fetch the chunk data first
|
|
153
153
|
const data = await this.redisClient.hgetall(`mulingstreamChunk:${mulingstreamChunkId}`);
|
|
154
154
|
if (!data || !data.mulingstreamChunkId) {
|