agora-appbuilder-core 4.1.10-beta.1 → 4.1.11
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/package.json +2 -2
- package/template/agora-rn-uikit/src/Utils/isBotUser.ts +1 -1
- package/template/android/app/build.gradle +0 -7
- package/template/bridge/rtc/webNg/RtcEngine.ts +2 -2
- package/template/bridge/rtm/web/Types.ts +0 -183
- package/template/bridge/rtm/web/index.ts +488 -450
- package/template/customization-api/typeDefinition.ts +0 -1
- package/template/defaultConfig.js +3 -4
- package/template/global.d.ts +0 -1
- package/template/ios/Podfile +0 -41
- package/template/package.json +5 -5
- package/template/src/AppRoutes.tsx +3 -3
- package/template/src/ai-agent/components/ControlButtons.tsx +1 -1
- package/template/src/assets/font-styles.css +1 -33
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/selection.json +1 -1
- package/template/src/atoms/ActionMenu.tsx +93 -13
- package/template/src/atoms/CustomIcon.tsx +1 -8
- package/template/src/atoms/DropDownMulti.tsx +80 -29
- package/template/src/atoms/Dropdown.tsx +0 -5
- package/template/src/atoms/Input.tsx +2 -1
- package/template/src/atoms/TertiaryButton.tsx +1 -1
- package/template/src/atoms/UserAvatar.tsx +1 -1
- package/template/src/components/ChatContext.ts +3 -5
- package/template/src/components/Controls.tsx +167 -208
- package/template/src/components/DeviceConfigure.tsx +1 -1
- package/template/src/components/EventsConfigure.tsx +168 -118
- package/template/src/components/Navbar.tsx +11 -14
- package/template/src/components/RTMConfigure.tsx +819 -32
- package/template/src/components/beauty-effect/useBeautyEffects.tsx +13 -50
- package/template/src/components/chat/chatConfigure.tsx +1 -7
- package/template/src/components/chat-messages/useChatMessages.tsx +11 -43
- package/template/src/components/controls/useControlPermissionMatrix.tsx +4 -32
- package/template/src/components/participants/AllHostParticipants.tsx +2 -10
- package/template/src/components/participants/Participant.tsx +1 -7
- package/template/src/components/participants/UserActionMenuOptions.tsx +2 -12
- package/template/src/components/precall/joinCallBtn.native.tsx +7 -2
- package/template/src/components/precall/joinCallBtn.tsx +7 -2
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +16 -15
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +31 -17
- package/template/src/components/precall/textInput.tsx +45 -22
- package/template/src/components/precall/usePreCall.tsx +7 -0
- package/template/src/components/recordings/RecordingsDateTable.tsx +2 -3
- package/template/src/components/room-info/useRoomInfo.tsx +5 -0
- package/template/src/components/useUserPreference.tsx +12 -39
- package/template/src/components/virtual-background/useVB.tsx +0 -18
- package/template/src/components/whiteboard/WhiteboardConfigure.tsx +0 -27
- package/template/src/language/default-labels/videoCallScreenLabels.ts +27 -11
- package/template/src/logger/AppBuilderLogger.tsx +3 -11
- package/template/src/pages/VideoCall.tsx +518 -171
- package/template/src/pages/video-call/ActionSheetContent.tsx +77 -77
- package/template/src/pages/video-call/SidePanelHeader.tsx +81 -53
- package/template/src/pages/video-call/VideoCallScreen.tsx +0 -18
- package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +1 -0
- package/template/src/rtm/RTMEngine.ts +37 -262
- package/template/src/rtm/utils.ts +1 -68
- package/template/src/rtm-events/constants.ts +7 -40
- package/template/src/rtm-events-api/Events.ts +39 -158
- package/template/src/subComponents/ChatBubble.tsx +3 -3
- package/template/src/subComponents/ChatContainer.tsx +9 -19
- package/template/src/subComponents/LocalAudioMute.tsx +2 -2
- package/template/src/subComponents/LocalVideoMute.tsx +2 -2
- package/template/src/subComponents/SidePanelEnum.tsx +0 -1
- package/template/src/subComponents/caption/Caption.tsx +48 -7
- package/template/src/subComponents/caption/CaptionContainer.tsx +324 -51
- package/template/src/subComponents/caption/CaptionIcon.tsx +35 -34
- package/template/src/subComponents/caption/CaptionText.tsx +103 -2
- package/template/src/subComponents/caption/LanguageSelectorPopup.tsx +179 -69
- package/template/src/subComponents/caption/Transcript.tsx +46 -11
- package/template/src/subComponents/caption/TranscriptIcon.tsx +27 -35
- package/template/src/subComponents/caption/TranscriptText.tsx +78 -3
- package/template/src/subComponents/caption/proto/ptoto.js +38 -4
- package/template/src/subComponents/caption/proto/test.proto +34 -19
- package/template/src/subComponents/caption/useCaption.tsx +754 -11
- package/template/src/subComponents/caption/useSTTAPI.tsx +118 -205
- package/template/src/subComponents/caption/useStreamMessageUtils.native.ts +152 -33
- package/template/src/subComponents/caption/useStreamMessageUtils.ts +165 -34
- package/template/src/subComponents/caption/utils.ts +171 -3
- package/template/src/subComponents/chat/ChatSendButton.tsx +0 -1
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +0 -16
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +1 -1
- package/template/src/subComponents/waiting-rooms/WaitingRoomControls.tsx +4 -7
- package/template/src/utils/SdkEvents.ts +3 -0
- package/template/src/utils/useEndCall.ts +4 -4
- package/template/src/utils/useMuteToggleLocal.ts +10 -14
- package/template/src/utils/useSpeechToText.ts +31 -20
- package/template/bridge/rtm/web/index-legacy.ts +0 -540
- package/template/src/components/RTMConfigure-legacy.tsx +0 -848
- package/template/src/components/UserGlobalPreferenceProvider.tsx +0 -227
- package/template/src/components/breakout-room/BreakoutRoomPanel.tsx +0 -58
- package/template/src/components/breakout-room/context/BreakoutRoomContext.tsx +0 -2508
- package/template/src/components/breakout-room/events/BreakoutRoomEventsConfigure.tsx +0 -272
- package/template/src/components/breakout-room/events/constants.ts +0 -17
- package/template/src/components/breakout-room/hoc/BreakoutRoomNameRenderer.tsx +0 -68
- package/template/src/components/breakout-room/hooks/useBreakoutRoomExit.ts +0 -49
- package/template/src/components/breakout-room/state/reducer.ts +0 -522
- package/template/src/components/breakout-room/state/types.ts +0 -54
- package/template/src/components/breakout-room/ui/BreakoutMeetingTitle.tsx +0 -60
- package/template/src/components/breakout-room/ui/BreakoutRoomActionMenu.tsx +0 -136
- package/template/src/components/breakout-room/ui/BreakoutRoomAnnouncementModal.tsx +0 -135
- package/template/src/components/breakout-room/ui/BreakoutRoomGroupSettings.tsx +0 -588
- package/template/src/components/breakout-room/ui/BreakoutRoomMainRoomUsers.tsx +0 -142
- package/template/src/components/breakout-room/ui/BreakoutRoomMemberActionMenu.tsx +0 -122
- package/template/src/components/breakout-room/ui/BreakoutRoomParticipants.tsx +0 -124
- package/template/src/components/breakout-room/ui/BreakoutRoomRaiseHand.tsx +0 -65
- package/template/src/components/breakout-room/ui/BreakoutRoomRenameModal.tsx +0 -227
- package/template/src/components/breakout-room/ui/BreakoutRoomSettings.tsx +0 -140
- package/template/src/components/breakout-room/ui/BreakoutRoomTransition.tsx +0 -52
- package/template/src/components/breakout-room/ui/BreakoutRoomView.tsx +0 -193
- package/template/src/components/breakout-room/ui/ExitBreakoutRoomIconButton.tsx +0 -79
- package/template/src/components/breakout-room/ui/ParticipantManualAssignmentModal.tsx +0 -638
- package/template/src/components/breakout-room/ui/SelectParticipantAssignmentStrategy.tsx +0 -57
- package/template/src/components/common/Dividers.tsx +0 -53
- package/template/src/components/controls/toolbar-items/ExitBreakoutRoomToolbarItem.tsx +0 -13
- package/template/src/components/raise-hand/RaiseHandButton.tsx +0 -50
- package/template/src/components/raise-hand/RaiseHandProvider.tsx +0 -308
- package/template/src/components/raise-hand/index.ts +0 -14
- package/template/src/components/room-info/useCurrentRoomInfo.tsx +0 -42
- package/template/src/components/room-info/useSetBreakoutRoomInfo.tsx +0 -64
- package/template/src/pages/video-call/BreakoutVideoCall.tsx +0 -213
- package/template/src/pages/video-call/VideoCallContent.tsx +0 -211
- package/template/src/pages/video-call/VideoCallStateWrapper.tsx +0 -495
- package/template/src/rtm/RTMConfigureBreakoutRoomProvider.tsx +0 -882
- package/template/src/rtm/RTMConfigureMainRoomProvider.tsx +0 -757
- package/template/src/rtm/RTMCoreProvider.tsx +0 -419
- package/template/src/rtm/RTMGlobalStateProvider.tsx +0 -706
- package/template/src/rtm/RTMStatusBanner.tsx +0 -99
- package/template/src/rtm/constants.ts +0 -12
- package/template/src/rtm/hooks/useMainRoomUserDisplayName.ts +0 -45
- package/template/src/rtm/rtm-presence-utils.ts +0 -344
- package/template/src/subComponents/chat/ChatAnnouncementView.tsx +0 -65
- package/template/src/utils/useDebouncedCallback.tsx +0 -20
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import {SidePanelType, useSidePanel} from 'customization-api';
|
|
4
4
|
import IconButton, {IconButtonProps} from '../../atoms/IconButton';
|
|
5
5
|
import LanguageSelectorPopup from './LanguageSelectorPopup';
|
|
6
|
-
import {useCaption} from './useCaption';
|
|
6
|
+
import {LanguageTranslationConfig, useCaption} from './useCaption';
|
|
7
7
|
import useSTTAPI from './useSTTAPI';
|
|
8
8
|
import {useString} from '../../utils/useString';
|
|
9
9
|
import {toolbarItemTranscriptText} from '../../language/default-labels/videoCallScreenLabels';
|
|
@@ -30,28 +30,22 @@ const TranscriptIcon = (props: TranscriptIconProps) => {
|
|
|
30
30
|
isMobileView = false,
|
|
31
31
|
} = props;
|
|
32
32
|
|
|
33
|
-
const {start, restart, isAuthorizedTranscriptUser} = useSTTAPI();
|
|
34
|
-
const {isSTTActive,
|
|
35
|
-
const isDisabled = !isAuthorizedTranscriptUser();
|
|
33
|
+
// const {start, restart, isAuthorizedTranscriptUser} = useSTTAPI();
|
|
34
|
+
const {isSTTActive, isSTTError, handleTranslateConfigChange} = useCaption();
|
|
35
|
+
// const isDisabled = !isAuthorizedTranscriptUser();
|
|
36
36
|
const [isLanguagePopupOpen, setLanguagePopup] =
|
|
37
37
|
React.useState<boolean>(false);
|
|
38
|
-
const isFirstTimePopupOpen = React.useRef(false);
|
|
38
|
+
// const isFirstTimePopupOpen = React.useRef(false);
|
|
39
39
|
|
|
40
40
|
const isTranscriptON = sidePanel === SidePanelType.Transcript;
|
|
41
41
|
const onPress = () => {
|
|
42
|
-
if (isSTTError) {
|
|
42
|
+
if (isSTTError || !isSTTActive) {
|
|
43
|
+
setLanguagePopup(true);
|
|
44
|
+
} else {
|
|
45
|
+
// isFirstTimePopupOpen.current = true;
|
|
43
46
|
setSidePanel(
|
|
44
47
|
isTranscriptON ? SidePanelType.None : SidePanelType.Transcript,
|
|
45
48
|
);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (isSTTActive) {
|
|
49
|
-
setSidePanel(
|
|
50
|
-
isTranscriptON ? SidePanelType.None : SidePanelType.Transcript,
|
|
51
|
-
);
|
|
52
|
-
} else {
|
|
53
|
-
isFirstTimePopupOpen.current = true;
|
|
54
|
-
setLanguagePopup(true);
|
|
55
49
|
}
|
|
56
50
|
};
|
|
57
51
|
|
|
@@ -63,13 +57,11 @@ const TranscriptIcon = (props: TranscriptIconProps) => {
|
|
|
63
57
|
iconBackgroundColor: isTranscriptON
|
|
64
58
|
? $config.PRIMARY_ACTION_BRAND_COLOR
|
|
65
59
|
: '',
|
|
66
|
-
tintColor:
|
|
67
|
-
? $config.SEMANTIC_NEUTRAL
|
|
68
|
-
: isTranscriptON
|
|
60
|
+
tintColor: isTranscriptON
|
|
69
61
|
? $config.PRIMARY_ACTION_TEXT_COLOR
|
|
70
62
|
: $config.SECONDARY_ACTION_COLOR,
|
|
71
63
|
},
|
|
72
|
-
disabled:
|
|
64
|
+
disabled: false,
|
|
73
65
|
btnTextProps: {
|
|
74
66
|
text: showLabel
|
|
75
67
|
? isOnActionSheet
|
|
@@ -85,23 +77,23 @@ const TranscriptIcon = (props: TranscriptIconProps) => {
|
|
|
85
77
|
iconButtonProps.toolTipMessage = label(isTranscriptON);
|
|
86
78
|
}
|
|
87
79
|
|
|
88
|
-
const onConfirm = async (
|
|
80
|
+
const onConfirm = async (inputTranslateConfig: LanguageTranslationConfig) => {
|
|
81
|
+
// isFirstTimePopupOpen.current = false;
|
|
82
|
+
// const method = isTranscriptON ? 'stop' : 'start';
|
|
83
|
+
// if (method === 'stop') return; // not closing the stt service as it will stop for whole channel
|
|
84
|
+
// if (method === 'start' && isSTTActive === true) return; // not triggering the start service if STT Service already started by anyone else in the channel
|
|
89
85
|
setLanguagePopup(false);
|
|
90
|
-
|
|
91
|
-
isFirstTimePopupOpen.current = false;
|
|
92
|
-
const method = isTranscriptON ? 'stop' : 'start';
|
|
93
|
-
if (method === 'stop') return; // not closing the stt service as it will stop for whole channel
|
|
94
|
-
if (method === 'start' && isSTTActive === true) return; // not triggering the start service if STT Service already started by anyone else in the channel
|
|
95
|
-
if (!isTranscriptON) {
|
|
96
|
-
setSidePanel(SidePanelType.Transcript);
|
|
97
|
-
} else {
|
|
98
|
-
setSidePanel(SidePanelType.None);
|
|
99
|
-
}
|
|
100
86
|
try {
|
|
101
|
-
const res = await start(language);
|
|
102
|
-
if (res?.message.includes('STARTED')) {
|
|
103
|
-
|
|
104
|
-
|
|
87
|
+
// const res = await start(language, userOwnLanguages);
|
|
88
|
+
// if (res?.message.includes('STARTED')) {
|
|
89
|
+
// // channel is already started now restart
|
|
90
|
+
// await restart(language, userOwnLanguages);
|
|
91
|
+
// }
|
|
92
|
+
await handleTranslateConfigChange(inputTranslateConfig);
|
|
93
|
+
if (!isTranscriptON) {
|
|
94
|
+
setSidePanel(SidePanelType.Transcript);
|
|
95
|
+
} else {
|
|
96
|
+
setSidePanel(SidePanelType.None);
|
|
105
97
|
}
|
|
106
98
|
} catch (error) {
|
|
107
99
|
console.log('eror in starting stt', error);
|
|
@@ -115,7 +107,7 @@ const TranscriptIcon = (props: TranscriptIconProps) => {
|
|
|
115
107
|
modalVisible={isLanguagePopupOpen}
|
|
116
108
|
setModalVisible={setLanguagePopup}
|
|
117
109
|
onConfirm={onConfirm}
|
|
118
|
-
isFirstTimePopupOpen={isFirstTimePopupOpen.current}
|
|
110
|
+
// isFirstTimePopupOpen={isFirstTimePopupOpen.current}
|
|
119
111
|
/>
|
|
120
112
|
</View>
|
|
121
113
|
);
|
|
@@ -3,24 +3,64 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import ThemeConfig from '../../../src/theme';
|
|
5
5
|
import hexadecimalTransparency from '../../../src/utils/hexadecimalTransparency';
|
|
6
|
-
import {formatTime} from './utils';
|
|
6
|
+
import {formatTime, getLanguageLabel} from './utils';
|
|
7
|
+
import {useLocalUid} from '../../../agora-rn-uikit';
|
|
8
|
+
|
|
9
|
+
type TranslationItem = {
|
|
10
|
+
lang: string;
|
|
11
|
+
text: string;
|
|
12
|
+
isFinal: boolean;
|
|
13
|
+
};
|
|
7
14
|
|
|
8
15
|
interface TranscriptTextProps {
|
|
9
16
|
user: string;
|
|
10
17
|
time: number;
|
|
11
18
|
value: string;
|
|
19
|
+
translations?: TranslationItem[];
|
|
12
20
|
searchQuery?: string;
|
|
21
|
+
selectedTranslationLanguage?: string;
|
|
13
22
|
}
|
|
14
23
|
|
|
15
24
|
export const TranscriptText = ({
|
|
16
25
|
user,
|
|
17
26
|
time,
|
|
18
27
|
value,
|
|
28
|
+
translations = [],
|
|
19
29
|
searchQuery = '',
|
|
30
|
+
selectedTranslationLanguage: storedTranslationLanguage,
|
|
31
|
+
transcriptViewMode = 'translated',
|
|
32
|
+
speakerUid,
|
|
33
|
+
localUserSpokenLanguage,
|
|
20
34
|
}: TranscriptTextProps) => {
|
|
21
35
|
const t = time ? formatTime(Number(time)) : '';
|
|
36
|
+
|
|
37
|
+
// text to display based on stored translation language
|
|
38
|
+
// const getDisplayText = () => {
|
|
39
|
+
// if (!storedTranslationLanguage) {
|
|
40
|
+
// return value; // no translation selected, show original
|
|
41
|
+
// }
|
|
42
|
+
|
|
43
|
+
// // find translation for the stored language
|
|
44
|
+
// const currentTranslation = translations.find(
|
|
45
|
+
// t => t.lang === storedTranslationLanguage,
|
|
46
|
+
// );
|
|
47
|
+
// if (currentTranslation?.text) {
|
|
48
|
+
// return currentTranslation.text;
|
|
49
|
+
// }
|
|
50
|
+
|
|
51
|
+
// // if stored language not available, show original
|
|
52
|
+
// return value;
|
|
53
|
+
// };
|
|
54
|
+
|
|
55
|
+
// const displayText = getDisplayText();
|
|
22
56
|
const regex = searchQuery ? new RegExp(`(${searchQuery})`, 'gi') : ' ';
|
|
23
|
-
const
|
|
57
|
+
const originalParts = value.split(regex);
|
|
58
|
+
|
|
59
|
+
// Prepare all translations with their parts for search highlighting
|
|
60
|
+
const translationsParts = translations.map(trans => ({
|
|
61
|
+
lang: trans.lang,
|
|
62
|
+
parts: trans.text.split(regex),
|
|
63
|
+
}));
|
|
24
64
|
|
|
25
65
|
return (
|
|
26
66
|
<View key={user} style={styles.transcriptTextContainer}>
|
|
@@ -36,9 +76,10 @@ export const TranscriptText = ({
|
|
|
36
76
|
</View>
|
|
37
77
|
|
|
38
78
|
<View>
|
|
79
|
+
{/* Original Text */}
|
|
39
80
|
<Text style={[styles.transciptText]}>
|
|
40
81
|
{/* If substring matches search query then highlight it */}
|
|
41
|
-
{
|
|
82
|
+
{originalParts.map((part, index) =>
|
|
42
83
|
part.toLowerCase() === searchQuery.toLowerCase() &&
|
|
43
84
|
searchQuery !== '' ? (
|
|
44
85
|
<Text key={index} style={styles.highlightedText}>
|
|
@@ -49,6 +90,29 @@ export const TranscriptText = ({
|
|
|
49
90
|
),
|
|
50
91
|
)}
|
|
51
92
|
</Text>
|
|
93
|
+
|
|
94
|
+
{/* All Translations */}
|
|
95
|
+
{translationsParts.map((translation, translationIndex) => (
|
|
96
|
+
<Text
|
|
97
|
+
key={translation.lang}
|
|
98
|
+
style={[styles.transciptText, styles.translationText]}>
|
|
99
|
+
{/* lang code */}
|
|
100
|
+
<Text style={styles.languageLabel}>
|
|
101
|
+
({getLanguageLabel([translation.lang])}):{' '}
|
|
102
|
+
</Text>
|
|
103
|
+
{/* lang */}
|
|
104
|
+
{translation.parts.map((part, index) =>
|
|
105
|
+
part.toLowerCase() === searchQuery.toLowerCase() &&
|
|
106
|
+
searchQuery !== '' ? (
|
|
107
|
+
<Text key={index} style={styles.highlightedText}>
|
|
108
|
+
{searchQuery ? part : part + ' '}
|
|
109
|
+
</Text>
|
|
110
|
+
) : (
|
|
111
|
+
<Text key={index}>{searchQuery ? part : part + ' '}</Text>
|
|
112
|
+
),
|
|
113
|
+
)}
|
|
114
|
+
</Text>
|
|
115
|
+
))}
|
|
52
116
|
</View>
|
|
53
117
|
</View>
|
|
54
118
|
);
|
|
@@ -95,4 +159,15 @@ const styles = StyleSheet.create({
|
|
|
95
159
|
highlightedText: {
|
|
96
160
|
backgroundColor: $config.SEMANTIC_NEUTRAL,
|
|
97
161
|
},
|
|
162
|
+
translationText: {
|
|
163
|
+
fontStyle: 'italic',
|
|
164
|
+
marginTop: 8,
|
|
165
|
+
fontWeight: '400',
|
|
166
|
+
lineHeight: 24,
|
|
167
|
+
fontSize: ThemeConfig.FontSize.normal,
|
|
168
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.medium,
|
|
169
|
+
},
|
|
170
|
+
languageLabel: {
|
|
171
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.low,
|
|
172
|
+
},
|
|
98
173
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var $protobuf = require("protobufjs
|
|
4
|
+
var $protobuf = require("protobufjs");
|
|
5
5
|
|
|
6
|
-
var $
|
|
6
|
+
var $protobufRoot = ($protobuf.roots.default || ($protobuf.roots.default = new $protobuf.Root()))
|
|
7
7
|
.addJSON({
|
|
8
8
|
agora: {
|
|
9
9
|
nested: {
|
|
@@ -55,7 +55,24 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|
|
55
55
|
rule: "repeated",
|
|
56
56
|
type: "Word",
|
|
57
57
|
id: 10
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
end_of_segment: {
|
|
60
|
+
type: "bool",
|
|
61
|
+
id: 11
|
|
62
|
+
},
|
|
63
|
+
duration_ms: {
|
|
64
|
+
type: "int32",
|
|
65
|
+
id: 12
|
|
66
|
+
},
|
|
67
|
+
data_type: {
|
|
68
|
+
type: "string",
|
|
69
|
+
id: 13
|
|
70
|
+
},
|
|
71
|
+
trans: {
|
|
72
|
+
rule: "repeated",
|
|
73
|
+
type: "Translation",
|
|
74
|
+
id: 14
|
|
75
|
+
},
|
|
59
76
|
}
|
|
60
77
|
},
|
|
61
78
|
Word: {
|
|
@@ -81,6 +98,23 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|
|
81
98
|
id: 5
|
|
82
99
|
}
|
|
83
100
|
}
|
|
101
|
+
},
|
|
102
|
+
Translation: {
|
|
103
|
+
fields: {
|
|
104
|
+
isFinal: {
|
|
105
|
+
type: "bool",
|
|
106
|
+
id: 1
|
|
107
|
+
},
|
|
108
|
+
lang: {
|
|
109
|
+
type: "string",
|
|
110
|
+
id: 2
|
|
111
|
+
},
|
|
112
|
+
texts: {
|
|
113
|
+
rule: "repeated",
|
|
114
|
+
type: "string",
|
|
115
|
+
id: 3
|
|
116
|
+
}
|
|
117
|
+
}
|
|
84
118
|
}
|
|
85
119
|
}
|
|
86
120
|
}
|
|
@@ -88,4 +122,4 @@ var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $pr
|
|
|
88
122
|
}
|
|
89
123
|
});
|
|
90
124
|
|
|
91
|
-
module.exports = $
|
|
125
|
+
module.exports = $protobufRoot;
|
|
@@ -1,23 +1,38 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
option
|
|
2
|
+
|
|
3
|
+
package Agora.SpeechToText;
|
|
4
|
+
option objc_class_prefix = "Stt";
|
|
5
|
+
option csharp_namespace = "AgoraSTTSample.Protobuf";
|
|
6
|
+
option java_package = "io.agora.rtc.speech2text";
|
|
7
|
+
option java_outer_classname = "AgoraSpeech2TextProtobuffer";
|
|
8
|
+
|
|
5
9
|
message Text {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
int32 vendor = 1;
|
|
11
|
+
int32 version = 2;
|
|
12
|
+
int32 seqnum = 3;
|
|
13
|
+
int64 uid = 4;
|
|
14
|
+
int32 flag = 5;
|
|
15
|
+
int64 time = 6;
|
|
16
|
+
int32 lang = 7;
|
|
17
|
+
int32 starttime = 8;
|
|
18
|
+
int32 offtime = 9;
|
|
19
|
+
repeated Word words = 10;
|
|
20
|
+
bool end_of_segment = 11;
|
|
21
|
+
int32 duration_ms = 12;
|
|
22
|
+
string data_type = 13;
|
|
23
|
+
repeated Translation trans = 14;
|
|
24
|
+
string culture = 15;
|
|
25
|
+
int64 text_ts = 16;
|
|
16
26
|
}
|
|
17
27
|
message Word {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
28
|
+
string text = 1;
|
|
29
|
+
int32 start_ms = 2;
|
|
30
|
+
int32 duration_ms = 3;
|
|
31
|
+
bool is_final = 4;
|
|
32
|
+
double confidence = 5;
|
|
33
|
+
}
|
|
34
|
+
message Translation {
|
|
35
|
+
bool is_final = 1;
|
|
36
|
+
string lang = 2;
|
|
37
|
+
repeated string texts = 3;
|
|
38
|
+
}
|