• 製品
  • 料金
  • リソース
  • サポート
このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。
Feedback

DescribeVoiceConversation

1. API Description

Domain name for API request: trtc.intl.tencentcloudapi.com.

After a conversation task starts successfully, use this API to query the conversation status. It can be used only while the conversation task is in progress. Querying after the conversation task exits returns an error.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: DescribeVoiceConversation.
VersionYesStringCommon Params. The value used for this API: 2019-07-22.
RegionYesStringCommon Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-hongkong, ap-singapore.
SdkAppIdYesIntegerThe TRTC SdkAppId. It must be the same SdkAppId as the conversation room.
TaskIdYesStringUnique ID of the conversation task. Returned when the conversation task starts successfully.
DescribeTypeNoIntegerWhether to include the conversation history.
Valid values:
- 0: Do not include the conversation history.
- 1: Include the conversation history.

Default: 0

3. Output Parameters

Parameter NameTypeDescription
StartTimeInteger

Task start time

Unit: ms

StatusStringConversation task status.
Valid values:

- Idle: The conversation task is idle.
- InProgress: The conversation task is in progress.
- Exited: The conversation task is exiting.
TaskIdStringUnique ID of the conversation task.
HistoryContentsArray of VoiceConversationHistoryContentConversation history.
RequestIdStringThe 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.

4. Example

Example1 Querying a conversation task

Input Example

POST / HTTP/1.1
Host: trtc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeVoiceConversation
<Common request parameters>

{
    "SdkAppId": 1400000311,
    "TaskId": "-nG0jIFU7rPr0tFW0cg282rOxP*************************bUA9JbOXgp3tnRyVJAzlBFAE.",
    "DescribeType": 1
}

Output Example

{
    "Response": {
        "HistoryContents": [
            {
                "Role": "user",
                "Content": "How is the recent weather in Shanghai"
            },
            {
                "Role": "assistant",
                "Content": "I'm unable to access real-time weather data, so I cannot tell you the exact current weather in Shanghai. I recommend checking your phone's built-in weather app or a platform such as China Weather to get the latest forecast.\n\nIf you tell me the specific date, I can also describe Shanghai's typical climate during this season, including temperature ranges and precipitation, for your reference."
            }
        ],
        "StartTime": 1790081311564,
        "Status": "InProgress",
        "TaskId": "-nG0jIFU7rPr0tFW0cg282rOxP*************************bUA9JbOXgp3tnRyVJAzlBFAE.",
        "RequestId": "ebb2213e-7322-4f9b-8fcd-60c08a5168b7"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error CodeDescription
AuthFailureCAM signature/authentication error.
AuthFailure.UnauthorizedOperationCAM authentication failed.
AuthFailure.UnsupportedOperationUnsupported operation.
FailedOperationOperation failed.
InternalErrorInternal error.
InvalidParameterParameter error.
InvalidParameter.SdkAppIdSdkAppId is incorrect.
MissingParameterMissing parameter.
MissingParameter.RoomIdRoomId is missing.
MissingParameter.SdkAppIdSdkAppId is missing.
MissingParameter.TaskIdTaskId parameter is missing.
MissingParameter.UserIdMissing UserId parameter.
ResourceNotFoundThe resource does not exist.