Domain name for API request: trtc.intl.tencentcloudapi.com.
Start up the transcription bot. The backend will pass the robot stream pulling to perform real-time speech recognition and deliver subtitles and transcription messages.
The transcription bot supports two stream pulling methods, controlled by the TranscriptionMode field.
The server delivers subtitles and transcription messages in real time through TRTC custom messages, with CmdId fixed to 1. Clients just need to listen to the custom message callback, such as the C++ callback (https://www.tencentcloud.com/document/product/647/79637?from_cn_redirect=1#4cd82f4edb24992a15a25187089e1565). Other clients such as Android and Web can likewise find it at the same link.
Note:
When TranscriptionMode is 0, ensure only one task is initiated in a room. If multiple tasks are initiated, robots will subscribe with each other. Unless the task is stopped proactively, it will timeout exit after 10 hours. In such cases, it is advisable to fill in SessionId to ensure subsequent repeated task failures.
A maximum of 50 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: StartAITranscription. |
| Version | Yes | String | Common Params. The value used for this API: 2019-07-22. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-singapore, ap-tokyo, na-siliconvalley. |
| SdkAppId | Yes | Integer | SdkAppId of TRTC, which is the same as the SdkAppId used by the room with transcription task enabled. |
| RoomId | Yes | String | RoomId of TRTC refers to the room number that enables the transcription task. |
| TranscriptionParams | Yes | TranscriptionParams | Transcription robot parameters. |
| SessionId | No | String | Unique Id passed by the caller, used by the server for task deduplication. duplicate tasks will fail to initiate. the server uses SdkAppId+RoomId+RoomIdType+RobotUserId for deduplication by default. if SessionId is provided, it will also be used for deduplication. Note:. When TranscriptionMode is 0, ensure only one task is initiated in a room. if multiple tasks are initiated, robots will subscribe to each other. unless the task is stopped proactively, it will timeout exit after 10 hours. in such cases, it is advisable to fill in SessionId to ensure subsequent repeated tasks fail. |
| RoomIdType | No | Integer | Type of the TRTC room number. 0 indicates digit room number, 1 indicates string room number. by default if left blank, it is digit room number. |
| RecognizeConfig | No | RecognizeConfig | Speech recognition configuration. |
| TranslationConfig | No | TranslationConfig | Translate configuration details. |
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | String | For unique identification of transcription task. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
POST / HTTP/1.1
Host: trtc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: StartAITranscription
<Common request parameters>
{
"SdkAppId": 1234,
"RoomId": "500123",
"RoomIdType": 1,
"TranscriptionParams": {
"UserId": "test_user",
"UserSig": "your-usersig",
"MaxIdleTime": 60,
"TranscriptionMode": 1,
"TargetUserId": "test_user"
}
}
{
"Response": {
"TaskId": "taskid",
"RequestId": "requestid"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.NotAbility | Unlock the required capability bit. |
| FailedOperation.NotAllowed | This operation is not allowed. submit a ticket to contact us. |
| FailedOperation.SdkAppIdNotUnderAppId | No resource belonging to this SdkAppId under the AppId. |
| FailedOperation.TaskExist | Task already exists |
| InvalidParameter.UserSig | UserSig is expired or wrong |
| InvalidParameter.UserSigNotAdmin | UserSig is not a super administrator. |
| ResourceInsufficient.RequestRejection | Insufficient resources. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan