Submits an audio production job that converts text into an audio file.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ice:SubmitAudioProduceJob | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
EditingConfig | string | Yes | The audio editing configurations.
Note
If you specify both voice and customizedVoice, customizedVoice takes precedence over voice.
| {"voice":"Siqi","format":"MP3","volume":50} |
OutputConfig | string | Yes | The output audio configurations. | |
InputConfig | string | Yes | The text content. A maximum of 2,000 characters are supported. The Speech Synthesis Markup Language (SSML) is supported. | |
Title | string | No | The job title. If you do not specify this parameter, the system generates a title based on the current date.
| |
Description | string | No | The job description.
| |
UserData | string | No | The user-defined data in the JSON format, which can be up to 512 bytes in length. You can specify a custom callback URL. For more information, see Configure a callback upon editing completion. | {"user":"data"} |
Overwrite | boolean | No | Specifies whether to overwrite the existing Object Storage Service (OSS) object. | true |
Response parameters
You can call the GetSmartHandleJob operation to query the execution details of an intelligent audio production job. The following example shows the result returned by the GetSmartHandleJob operation for a successful job.
{
"RequestId": "******2D-443C-5043-B0E4-867070******",
"JobId": "******042d5e4db6866f6289d1******",
"State": "Finished",
"SmartJobInfo": {
"Title": "default_title_2022-01-21T06:15:07Z",
"JobType": "TextToSpeech",
"CreateTime": "2022-01-21T06:15:07Z",
"ModifiedTime": "2022-01-21T06:15:07Z",
"InputConfig": {
"InputFile": "Talking about Guo Degang, he is now incredibly popular. Although ticket prices are high, his shows often sell out instantly. In addition, he frequently appears on various comedy programs, where he judges performances by new comedians."
},
"EditingConfig": "{\"format\":\"MP3\",\"pitch_rate\":0,\"sample_rate\":16000,\"speech_rate\":0,\"voice\":\"Siqi\",\"volume\":50}",
"OutputConfig": {
"Bucket": "your-bucket",
"Object": "your-audio"
}
},
"JobResult": {
"MediaId": "******bf47c94e82b3b2014361******",
"AiResult": "[{\"content\":\"Talking about\",\"from\":0.0,\"to\":0.846},{\"content\":\"he is now incredibly popular\",\"from\":0.846,\"to\":3.386},{\"content\":\"Although ticket prices are high\",\"from\":3.386,\"to\":4.402},{\"content\":\"his shows often sell out instantly\",\"from\":4.402,\"to\":6.265},{\"content\":\"In addition, he frequently appears on various comedy programs, where he judges performances by new comedians\",\"from\":6.265,\"to\":10.33}]"
}
}
Examples
Sample success responses
JSON
format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"JobId": "****20b48fb04483915d4f2cd8ac****",
"State": "Created",
"MediaId": "****2bcbfcfa30fccb36f72dca22****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-11-15 | The response structure of the API has changed | View Change Details |
2021-04-16 | The response structure of the API has changed | View Change Details |