@mulingai-npm/redis 2.2.1 → 2.3.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.
|
@@ -6,8 +6,8 @@ export type MulingstreamChunkData = {
|
|
|
6
6
|
chunkNumber: number;
|
|
7
7
|
language: string;
|
|
8
8
|
sttProviders: SttProvider[];
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
targetLanguages: string[];
|
|
10
|
+
shortCodeTargetLanguages: string[];
|
|
11
11
|
finalTranscription: string;
|
|
12
12
|
sttStatus: StepStatus;
|
|
13
13
|
audioChunk: {
|
|
@@ -71,8 +71,8 @@ export declare class MulingstreamChunkManager {
|
|
|
71
71
|
isLast: boolean;
|
|
72
72
|
theme: string;
|
|
73
73
|
sttProviders: SttProvider[];
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
targetLanguages: string[];
|
|
75
|
+
shortCodeTargetLanguages: string[];
|
|
76
76
|
}): Promise<void>;
|
|
77
77
|
/**
|
|
78
78
|
* Given roomId and chunkNumber, return the single chunk from the array
|
|
@@ -52,7 +52,7 @@ class MulingstreamChunkManager {
|
|
|
52
52
|
}
|
|
53
53
|
async addMulingstreamChunk(params) {
|
|
54
54
|
var _a;
|
|
55
|
-
const { roomId, chunkNumber, language, start, end, duration, isFirst, isLast, theme, sttProviders,
|
|
55
|
+
const { roomId, chunkNumber, language, start, end, duration, isFirst, isLast, theme, sttProviders, targetLanguages, shortCodeTargetLanguages } = params;
|
|
56
56
|
const audioChunk = {
|
|
57
57
|
start,
|
|
58
58
|
end,
|
|
@@ -71,13 +71,11 @@ class MulingstreamChunkManager {
|
|
|
71
71
|
}
|
|
72
72
|
const translation = {};
|
|
73
73
|
const tts = {};
|
|
74
|
-
for (const lang of
|
|
74
|
+
for (const lang of shortCodeTargetLanguages) {
|
|
75
75
|
translation[lang] = {
|
|
76
76
|
translation: '',
|
|
77
77
|
status: 'INIT'
|
|
78
78
|
};
|
|
79
|
-
}
|
|
80
|
-
for (const lang of ttsTargetLanguages) {
|
|
81
79
|
tts[lang] = {
|
|
82
80
|
ttsAudioPath: '',
|
|
83
81
|
status: 'INIT',
|
|
@@ -89,8 +87,8 @@ class MulingstreamChunkManager {
|
|
|
89
87
|
chunkNumber,
|
|
90
88
|
language,
|
|
91
89
|
sttProviders,
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
targetLanguages,
|
|
91
|
+
shortCodeTargetLanguages,
|
|
94
92
|
finalTranscription: '',
|
|
95
93
|
sttStatus: 'INIT',
|
|
96
94
|
audioChunk,
|