製品アップデート情報
Tencent Cloudオーディオビデオ端末SDKの再生アップグレードおよび承認チェック追加に関するお知らせ
TRTCアプリケーションのサブスクリプションパッケージサービスのリリースに関する説明について

trtc.on(TRTC.EVENT.CUSTOM_MESSAGE, event => { // Receive custom messages. // event.userId: The userId of the ASR robot. // event.cmdId: The message ID, which is fixed at 1 for transcriptions and captions. // event.seq: The sequence number of a message. // event.data: ArrayBuffer type. For content of transcriptions or captions, see the explanation of the data field below. const data = new TextDecoder().decode(event.data) // Explanation of the data field is as follows. console.log(`received custom msg from ${event.userId}, message: ${ data }`) })
Field Name | Type | Meaning |
type | Integer | 10000: When there are real-time captions and a complete sentence, the message type will be delivered. |
sender | String | Speaker's userid. |
receiver | Array | List of receiver userid. The message is actually broadcast within the room. |
payload.text | String | Recognized text, Unicode encoded. |
payload.start_time | String | Message start time. It is the absolute time after a task starts. |
payload.end_time | String | Message end time. It is the absolute time after a task starts. |
payload.end | Boolean | If true, this indicates a complete sentence |
{"type": 10000,"sender": "user_a","payload": {"text":"","start_time":"00:00:02","end_time":"00:00:05","end": true}}
{"type": 10000,"sender": "ai_951073","payload": {"start_time_ms": 1760,"end_time_ms": 5530,"end": false,"roundid": "e6330a3c-eed7-40bb-8229-9bbe733a313f", // Unique ID for each conversation round"translation_text": "simultaneous interpretation of the meeting", // Translated text"translation_language": "en", // Language code of the translation"taskid": "x-dPLCz" // Unique identifier of the transcription task}}
Language Code | Language Name |
"zh" | Chinese |
"en" | English |
"es" | Spanish |
"pt" | Portuguese |
"fr" | French |
"de" | German |
"ru" | Russian |
"ar" | Arabic |
"ja" | Japanese |
"ko" | Korean |
"vi" | Vietnamese |
"ms" | Malay |
"id" | Indonesian |
"it" | Italian |
"th" | Thai |
フィードバック