ModifyVoiceConversation
1. API Description
Domain name for API request: trtc.intl.tencentcloudapi.com.
After a conversation task starts successfully, use this API to modify its configuration.
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 Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: ModifyVoiceConversation. |
| 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-hongkong, ap-singapore. |
| SdkAppId | Yes | Integer | The SdkAppId of TRTC, which is the same as the SdkAppId corresponding to the conversation room. |
| TaskId | Yes | String | Unique ID of the conversation task. Returned when the conversation task starts successfully. |
| SequenceNumber | Yes | Integer | For the same task, SequenceNumber must increase with each modification request. This prevents requests from being applied out of order. |
| LLMConfig | No | VoiceConversationLLMConfig | Large language model (LLM) configuration. Applies only in Cascade mode. In S2S mode, the request returns an error. |
| S2SConfig | No | VoiceConversationS2SConfig | End-to-end speech-to-speech model configuration. Applies only in S2S mode. In Cascade mode, the request returns an error. |
| DialogConfig | No | VoiceConversationDialogConfig | Conversation control configuration. Applies only in Cascade mode. |
3. Output Parameters
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | String | Unique ID of the conversation 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. |
4. Example
Example1 Modify ai Dialogue
Input Example
POST / HTTP/1.1
Host: trtc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyVoiceConversation
<Common request parameters>
{
"SdkAppId": 1400704311,
"TaskId": "-nG0jIFU7llEfJ3MR8El60TD18*************************bOp75dg0i7c+NqbBQ2tAxOAE.",
"SequenceNumber": 0,
"LLMConfig": {
"LLMType": "openai",
"Model": "gpt-4o-mini",
"APIUrl": "https://translationsllm.openai.azure.com****************************************pletions?api-version=2025-01-01-preview",
"APIKey": "CKLhA70tjVXN8Tp0ADnCiv5YSqFe****************************99BJAC4f1cMXJ3w3AAABACOG9t8q",
"SystemPrompt": "You are a conversation assistant.",
"MaxTokens": 2048,
"MaxHistory": 50,
"MaxToolRound": 20,
"Timeout": 20000,
"Temperature": 0.5,
"TopP": 0.9,
"McpServer": {
"Name": "weather-mcp",
"Url": "https://m*********e.com/v1",
"Timeout": 5000,
"ToolList": [
"get_weather"
]
}
},
"DialogConfig": {
"InterruptMode": 2,
"InterruptKeywords": [
stop
]
}
}Output Example
{
"Response": {
"TaskId": "-nG0jIFU7llEfJ3MR8El60TD18*************************bOp75dg0i7c+NqbBQ2tAxOAE.",
"RequestId": "0842be45-1e51-401a-8372-f57f6c86edb9"
}
}5. Developer Resources
SDK
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for Node.js
- Tencent Cloud SDK 3.0 for .NET
- Tencent Cloud SDK 3.0 for C++
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 Code | Description |
|---|---|
| AuthFailure | CAM signature/authentication error. |
| AuthFailure.UnauthorizedOperation | CAM authentication failed. |
| AuthFailure.UnsupportedOperation | Unsupported operation. |
| FailedOperation | Operation failed. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameter.OutOfRange | Parameter value is out of range. |
| InvalidParameter.SdkAppId | SdkAppId is incorrect. |
| MissingParameter | Missing parameter. |
| MissingParameter.Region | Region parameter missing. |
| MissingParameter.SdkAppId | SdkAppId is missing. |
| MissingParameter.UserId | Missing UserId parameter. |
| ResourceNotFound | The resource does not exist. |
| UnsupportedOperation | Unsupported operation. |
