All Products
Search
Document Center

Intelligent Media Services:SubmitAudioProduceJob

Last Updated:Dec 27, 2024

Submits an audio production job that converts text into an audio file.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ice:SubmitAudioProduceJob
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EditingConfigstringYes

The audio editing configurations.

  • voice: the voice type.
  • customizedVoice: the ID of the personalized human voice.
  • format: the format of the output file. Valid values: PCM, WAV, and MP3.
  • volume: the volume. Default value: 50. Valid values: 0 to 100.
  • speech_rate: the speech tempo. Default value: 0. Value range: -500 to 500.
  • pitch_rate: the intonation. Default value: 0. Value range: -500 to 500.
Note If you specify both voice and customizedVoice, customizedVoice takes precedence over voice.
{"voice":"Siqi","format":"MP3","volume":50}
OutputConfigstringYes

The output audio configurations.

InputConfigstringYes

The text content. A maximum of 2,000 characters are supported. The Speech Synthesis Markup Language (SSML) is supported.

TitlestringNo

The job title. If you do not specify this parameter, the system generates a title based on the current date.

  • The job title can be up to 128 bytes in length.
  • The value must be encoded in UTF-8.
DescriptionstringNo

The job description.

  • The job description can be up to 1,024 bytes in length.
  • The value must be encoded in UTF-8.
UserDatastringNo

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"}
OverwritebooleanNo

Specifies whether to overwrite the existing Object Storage Service (OSS) object.

true

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

******11-DB8D-4A9A-875B-275798******
JobIdstring

The job ID.

****20b48fb04483915d4f2cd8ac****
Statestring

The job state. Valid values:

  • Created
  • Executing
  • Finished
  • Failed
Created
MediaIdstring

The ID of the media asset.

****2bcbfcfa30fccb36f72dca22****

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

JSONformat

{
  "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 timeSummary of changesOperation
2023-11-15The response structure of the API has changedView Change Details
2021-04-16The response structure of the API has changedView Change Details