PreviewVoice

Updated at:

Generates a preview of a synthesized voice.

Try it now

You can call this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful call, OpenAPI Explorer automatically generates SDK code examples.

Try it now

RAM authorization

The following table lists the authorization information of this API. You can use the Action element of a RAM policy statement to grant a RAM user or RAM role the permission to call this API. Details:

  • Operation: the specific permission point.

  • Access level: the access level of each operation, which can be Write, Read, or List.

  • Resource type: the resource types supported for authorization in this operation. Details:

    • Required resource types are marked with a preceding *.
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.

  • Related operation: other permissions required to successfully perform the operation. The caller must have the permissions of the related operations at the same time for the operation to succeed.

OperationAccess levelResource typeCondition keyRelated operation
bailianvoicebot:PreviewVoicecreate
*All resources
*
    None
None

Request parameters

NameTypeRequiredDescriptionExample value
BusinessUnitIdstringYes

The ID of the Model Studio business unit.

llm-c11iig67g863rih8
NlsEnginestringYes

The TTS engine.

BAILIAN
NlsAccessTypestringYes

The TTS access type.

MANAGED
ModelstringNo

The TTS model.

Qwen
VoicestringYes

The voice for synthesis.

Cherry
TextstringYes

The text to synthesize for the preview.

Hello, nice to meet you
ParamsobjectNo

The synthesis parameters.

SpeechRatefloatNo

The speech rate.

Note Valid values: -500~500.
0
VolumeintegerNo

The volume.

Note Valid values: 0~100.
50
PitchRatefloatNo

The pitch rate.

Note Valid values: -500~500.
0

Response elements

NameTypeDescriptionExample value
object

Schema of Response

RequestIdstring

The request ID.

CF6D3484-19A1-5C77-863B-AC8B5754D37C
HttpStatusCodeinteger

The HTTP status code.

200
Messagestring

The error message.

Instance llm-baployoyopf22m2r does not exist.
Codestring

The internal error code.

OK
Datastring

The preview audio link.

https://cab-config-pre.oss-cn-hangzhou.aliyuncs.com/TTSDEMO/05B9FBF3-3681-10FF-9C24-340A93F3A25F.wav?Expires=1774795253&OSSAccessKeyId=YOUR_ACCESS_KEY_ID&Signature=YOUR_SIGNATURE&security-token=YOUR_SECURITY_TOKEN
Paramsarray

The list of dynamic error parameters.

paramstring

A dynamic error parameter.

llm-xdne77rxe14ziszr

Examples

Success response

JSON format

{
  "RequestId": "CF6D3484-19A1-5C77-863B-AC8B5754D37C",
  "HttpStatusCode": 200,
  "Message": "Instance llm-baployoyopf22m2r does not exist.",
  "Code": "OK",
  "Data": "https://cab-config-pre.oss-cn-hangzhou.aliyuncs.com/TTSDEMO/05B9FBF3-3681-10FF-9C24-340A93F3A25F.wav?Expires=1774795253&OSSAccessKeyId=YOUR_ACCESS_KEY_ID&Signature=YOUR_SIGNATURE&security-token=YOUR_SECURITY_TOKEN",
  "Params": [
    "llm-xdne77rxe14ziszr"
  ]
}

Error codes

Visit the Error Center for more error codes.

Release notes

Change timeChange summaryOperation
2026-04-22New OpenAPIView change details