SubmitAudioProduceJob
Converts the provided text content into high-quality speech audio files.
Operation description
This operation is an asynchronous operation. After a task is submitted, a task ID is returned. The task is not completed at this point and enters a background queue for asynchronous execution. The final result is delivered through a callback notification. You can also proactively query the task status by calling the Query intelligent task results operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:SubmitAudioProduceJob |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| EditingConfig |
string |
Yes |
The audio production configuration:
|
{"voice":"Siqi","format":"MP3","volume":50} |
| OutputConfig |
string |
Yes |
The audio output configuration. For example, to store the output speech at http://my_bucket.oss-cn-shanghai.aliyuncs.com/target_audio.mp3, the parameter settings are as follows: { "bucket": "my_bucket", "object": "target_audio" } |
{ "bucket": "my_bucket", "object": "target_audio" } |
| InputConfig |
string |
Yes |
The text content. A maximum of 10,000 Chinese characters are supported. Speech Synthesis Markup Language (SSML) is supported. |
test |
| Title |
string |
No |
The task title. If not provided, a default title is automatically generated based on the date.
|
taskTitle |
| Description |
string |
No |
The task description:
|
taskDescription |
| UserData |
string |
No |
The custom settings in JSON format. The maximum length is 512 bytes. Custom callback URL configuration is supported. |
{"NotifyAddress":"http://xx.xx.xxx"} |
| Overwrite |
boolean |
No |
Specifies whether to overwrite existing OSS files. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
******11-DB8D-4A9A-875B-275798****** |
| JobId |
string |
The task ID. |
****20b48fb04483915d4f2cd8ac**** |
| State |
string |
The task status. Valid values:
|
Created |
| MediaId |
string |
The media asset ID. |
****2bcbfcfa30fccb36f72dca22**** |
You can use the JobId of the intelligent speech task to query the detailed execution information of the task by calling the Query intelligent task results operation. When the task is executed successfully, the sample response returned by the Query intelligent task results operation is as follows.
By default, AI_TTS segments sentences based on Chinese punctuation marks such as commas and periods.
{
"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": "When it comes to Guo Degang, it can be said that he is red and purple now, and the ticket price is often very high, but he is robbed as soon as he starts. He also participates in various crosstalk variety shows to comment on the new performers."
},
"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": "[{\"text\":\"When it comes to\",\"begin_time\":0,\"end_time\":846},{\"text\":\"it can be said that he is red and purple now\",\"begin_time\":846,\"end_time\":3386},{\"text\":\"and the ticket price is often very high\",\"begin_time\":3386,\"end_time\":4402},{\"text\":\"but he is robbed as soon as he starts\",\"begin_time\":4402,\"end_time\":6265},{\"text\":\"He also participates in various crosstalk variety shows to comment on the new performers.\",\"begin_time\":6265,\"end_time\":10330}]"
}
}
Examples
Success response
JSON format
{
"RequestId": "******11-DB8D-4A9A-875B-275798******",
"JobId": "****20b48fb04483915d4f2cd8ac****",
"State": "Created",
"MediaId": "****2bcbfcfa30fccb36f72dca22****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.