You need to enable JavaScript to run this app.
Lake AI Service

Lake AI Service

Copy page
Download PDF
Audio Generation
Voice Cloning Synthesis
Copy page
Download PDF
Voice Cloning Synthesis

The Voice Cloning Synthesis operator converts input text into speech audio, supporting voice timbre design via style description, as well as controllable cloning or high-fidelity continuation based on reference audio.

Operator introduction

Operator ID: las_voice_forge

Applicable scenarios

  • Text-to-speech: Narration, broadcast, short video dubbing, and other text-to-speech scenarios.
  • Stable timbre reuse: Brand voice, virtual avatars, intelligent customer service, and other scenarios requiring stable timbre reuse.
  • High-fidelity continuation: High-fidelity continuation of character voices with prompt audio and accurate transcripts.
  • Long audio generation: Long text explanations, course content, news broadcasts, and other long audio generation scenarios.

Core capabilities

  • Multiple speech synthesis capabilities:
    • Voice Design text-based timbre control: Generate speech solely by describing the target voice style with style_prompt, without requiring a sample audio.
    • Controllable voice cloning: Provide a sample audio via reference_audio_uri to synthesize the target text based on the timbre of the sample.
    • High-fidelity voice continuation: Provide both prompt_audio_uri and prompt_text to enhance consistency in timbre, speech rate, and prosody.
  • Long text segmentation and concatenation: Supports splitting long text at natural boundaries, synthesizing segment by segment, and automatically concatenating the results.
  • Quality self-check and retry: Supports automatic regeneration when suspected low-quality results are detected.
  • Multi-format audio output: Supports wav, mp3, ogg_opus, pcm, and configurable sample rate and bitrate.
  • Object storage persistence: Supports multiple audio formats, can write results to TOS, and returns information such as audio address, format, sample rate, duration, and character count.

Demonstration

  • Scenario 1: Voice design based on style-prompt

    "text": "欢迎使用声音复刻算子,这是一个语音合成示例。"
    
  • Output audio

    无参考音频.wav
    Unknown size

Scenario 2: Voice cloning with reference audio

"text": "欢迎使用声音复刻算子,这是一个语音合成示例。"
  • Input reference audio
    旁白.wav
    Unknown size
  • Output audio
    有参考音频.wav
    Unknown size
  • Scenario 3: High-fidelity audio continuation

    "text": "小寨子的日升月落里,重复着平淡的日常,确在细微处留下不一样的故事。"
    
  • Input prompt audio

    旁白.wav
    Unknown size

  • Output audio

    音频续写.wav
    Unknown size

Supported regions

  • Beijing: cn-beijing

Operator performance

Sub-item
Performance impact description

Maximum Submit RPM

5

Maximum Poll RPM

300

Input and output requirements

Input requirements

Subdivision

Detailed requirements

Input data modality

  • Text
  • Audio (reference audio, prompt audio)

Input format: text

  • Input text supports two pause notations: <break time="500ms"/> and <break time="2s"/>, with a maximum single pause duration of 30,000 milliseconds. The <break> tag will not be spoken.
  • Currently, full SSML is not supported, nor are other tags such as <speak>, <prosody>, or <emphasis>.

Input format: audio

  • Supports WAV format
  • Size: Must not exceed 50 MB, duration range is 0.1 to 300 seconds; for production scenarios, it is recommended to use single-speaker, clear, low-noise audio of about 5 to 15 seconds.
  • Other:
    • Reference audio: Input reference audio to the model via the reference_audio_uri request parameter, suitable for scenarios where voice cloning is based on reference audio.
    • Prompt audio:
      • By providing the prompt audio to the model via the prompt_audio_uri request parameter, and simultaneously supplying prompt_text (the exact transcript corresponding to the prompt audio), you can further enhance the consistency of the output audio's timbre, speed, and prosody with the prompt audio.
      • In this scenario, the new audio is synthesized using the voice and expression style of the prompt audio. It is not supported to additionally configure style_prompt to specify the style of the generated audio.

Input path

Input data is provided to the operator via the reference_audio_uri and prompt_audio_uri request parameters. Currently, two methods are supported: public URL and TOS path.

  • Public URL: An audio URL accessible via the public internet, in the format http/https.
    • Public URLs do not support addresses requiring login status or additional header authentication; temporary URLs must remain valid during task execution.
  • TOS path: After uploading the data to be processed to a TOS Bucket under the same primary account and region as the current LAS service, you can provide a TOS path in the format tos://bucket_name/demo.
    • The TOS object must exist and have read permissions.

Output requirements

Subdivision

Detailed requirements

Output data modality

  • Audio

Output format: Audio

  • Format: Supports wav, mp3, ogg_opus, and pcm.
  • Other: pcm output is a raw s16le mono stream without a WAV header; downstream decoding requires the sample_rate. bit_rate does not apply to wav / pcm.

Output path: object storage

The output storage path for the operator's results can be specified via the output_object_storage_dir request parameter. Currently, setting a TOS path is supported.

  • TOS path: A writable TOS Bucket directory under the same primary account and region as the LAS service, format: tos://bucket/output/.

Billing information
  • 计费标准

    细分项
    计费标准说明

    计费项

    基于合成音频的文本字符数统计用量,进行计费。

    计费类型

    按量计费,单位:元/万字符,按实际的计费用量每小时出账。

    单价

    1.5 元/万字符

Caution and prerequisites

Details

Caution and prerequisites

Costs

Before calling an operator, you need to understand the model invocation costs associated with using the operator. For details, see Large model invocation billing.

Authentication (API Key)

Before calling an operator, you need to generate an API Key for operator invocation. It is recommended to configure the API Key as an environment variable to ensure safer operator calls. For details, see Obtain and configure API Key.

BaseURL

Before calling an operator, you need to determine the BaseURL for operator invocation based on the region where your current LAS service is deployed. This is used to configure the path parameter values for operator calls.
For details, see Obtain the Base URL. The Examples below are for reference only; when making actual calls, replace the path values with those corresponding to your region.

Rest API call

API usage instructions

  • The API for this operator is an asynchronous task interface. You need to submit a task through the Submit interface to obtain the task's task_id, then use the Poll interface to check the status of the corresponding task (task_id) and retrieve the operator's processing result.
  • Caution: After submitting a task, the task_id is valid for three days. After three days, you will not be able to use this task_id to retrieve the operator's processing result.

Submit

API description

Submit a las_voice_forge voice cloning / speech synthesis task. The API returns an asynchronous task ID. After the task is completed, use the Poll API to query the synthesis result.

Request parameters

Parameter
Type
Required
Example value
Description
operator_id
string
Yes
las_voice_forge
Operator ID, fixed as las_voice_forge.
operator_version
string
Yes
v1
Operator version, fixed as v1.
data
VoiceForgeUserReqParams
Yes
Voice Cloning Synthesis business parameters.
callback
object
No
{"url":"https://example.com/callback"}
Task final state callback configuration, callback address is callback.url; if not specified, results are obtained via Poll.
pending_timeout_minutes
integer
No
60
PENDING queue timeout in minutes, range 30 to 4320; after timeout, the task enters EXPIRED state.

Response parameters

Parameter
Type
Example value
Description
metadata
Metadata
Request metadata.

Example

Request example

curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/submit" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $LAS_API_KEY" \
--data '{
    "operator_id": "las_voice_forge",
    "operator_version": "v1",
    "data": {
        "req_params": {
            "text": "欢迎使用声音复刻算子,这是一个语音合成示例。",
            "audio_params": {
                "format": "wav",
                "sample_rate": 48000
            }
        },
        "engine_params": {
            "style_prompt": "沉稳专业的男声,语速适中"
        },
        "service_params": {
            "response_mode": "audio_uri"
        }
    },
    "pending_timeout_minutes": 60
}'

Response example

{
  "metadata": {
    "task_id": "ffb57ea6450c894f354c",
    "task_status": "PENDING",
    "business_code": "0",
    "error_msg": ""
  }
}

Error code

HttpStatusCode

Error code

Error message

Description

400

Parameter.Invalid

The parameter is invalid.

Incorrect field type, enumeration, value range, or parameter dependency.

400

Operator.InvalidId

The operator id is invalid.

operator_id is invalid or unavailable.

400

Operator.InvalidVersion

The operator version is invalid.

operator_version is invalid.

400

Tts.InvalidText

The synthesis text is empty after cleaning.

The text is empty or becomes empty after processing.

400

Tts.TextTooLong

The synthesis text exceeds the maximum length.

The text exceeds the allowed length.

400

Tts.TooManySegments

The synthesis text has too many segments.

The number of segments after splitting the long text is too high.

400

Tts.ReferenceAudioInvalid

The reference audio is invalid.

The reference or prompt audio address, format, or content does not meet requirements.

400

Tts.ReferenceAudioRequired

Reference audio is required.

The required reference audio is missing for the current synthesis method.

400

Tts.InvalidRequest

The TTS request is invalid.

Incorrect parameter combination. For example, both prompt_audio_uri and prompt_text were not provided.

401

Authorization.Missing

Missing Authorization.

Missing authentication information.

401

ApiKey.Invalid

The api key is invalid.

API Key is invalid.

429

Server.Busy

Server is Busy, please try again later.

The service is busy or rate limited.

500

Tts.InternalError

TTS Internal Error

Voice synthesis service exception.

500

Tts.AudioSaveFailed

Failed to transcode or persist the audio.

Audio transcoding or saving failed.

500

Tts.EngineLoadFailed

The synthesis engine failed to load.

Synthesis service is temporarily unavailable.

500

Tts.EngineGpuOom

The synthesis engine ran out of GPU memory.

Insufficient synthesis resources.

500

Tts.RequestTimeout

The synthesis request timed out.

Synthesis task timed out.

Poll

API description

Query the status and result of a las_voice_forge voice cloning / speech synthesis task by task ID. After the task is completed, the audio address, audio format, sample rate, duration, and other information are returned.

Request parameters

Name

Type

Required

Example value

Description

operator_id

string

Yes

las_voice_forge

Operator ID, fixed as las_voice_forge.

operator_version

string

Yes

v1

Operator version, fixed as v1.

task_id

string

Yes

ffb57ea6450c894f354c

Asynchronous task ID returned by the Submit API.

Response parameters

Parameter
Type
Example value
Description
metadata
Metadata
Request metadata and task status.
data
VoiceForgeUserResp
Voice synthesis result after task completion.

Example

Request example

curl --location "https://operator.las.ap-southeast-1.volces.com/api/v1/poll" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $LAS_API_KEY" \
--data '{
    "operator_id": "las_voice_forge",
    "operator_version": "v1",
    "task_id": "ffb57ea6450c894f354c"
}'

Response example

{
  "metadata": {
    "task_id": "ffb57ea6450c894f354c",
    "task_status": "COMPLETED",
    "submit_time": "2026-07-21T16:04:06+08:00",
    "end_time": "2026-07-21T16:04:09+08:00",
    "business_code": "0",
    "error_msg": ""
  },
  "data": {
    "data": "",
    "audio_uri": "https://example-bucket.tos-cn-beijing.volces.com/voice_forge/tts/demo.wav?X-Tos-Signature=...",
    "audio_format": "wav",
    "sample_rate": 48000,
    "duration_sec": 3.04,
    "text_chars": 11,
    "segment_count": 1,
    "reference_audio_used": true
  }
}

Error code

HttpStatusCode

Error code

Error message

Description

400

TaskId.Invalid

The task id is invalid.

The task ID is empty, does not exist, or is inaccessible.

400

Parameter.Invalid

The parameter is invalid.

Parameter validation failed or task result parsing failed.

400

Tts.InvalidText

The synthesis text is empty after cleaning.

The text is empty or becomes empty after processing.

400

Tts.TextTooLong

The synthesis text exceeds the maximum length.

The text exceeds the allowed length.

400

Tts.TooManySegments

The synthesis text has too many segments.

The number of segments after splitting the long text is too high.

400

Tts.InvalidRequest

The TTS request is invalid.

Incorrect request parameter combination.

400

Tts.ReferenceAudioInvalid

The reference audio is invalid.

The reference or prompt audio does not meet requirements.

401

Authorization.Missing

Missing Authorization.

Missing authentication information.

401

ApiKey.Invalid

The api key is invalid.

API Key is invalid.

429

Server.Busy

Server is Busy, please try again later.

The service is busy or rate limited.

500

Server.InternalError

General Internal Error

Internal server error.

500

Tts.InternalError

TTS Internal Error

Voice synthesis service exception.

500

Tts.AudioSaveFailed

Failed to transcode or persist the audio.

Audio transcoding or saving failed.

500

Tts.EngineLoadFailed

The synthesis engine failed to load.

Synthesis service is temporarily unavailable.

500

Tts.EngineGpuOom

The synthesis engine ran out of GPU memory.

Insufficient synthesis resources.

500

Tts.RequestTimeout

The synthesis request timed out.

Synthesis task timed out.

Last updated: 2026.08.18 15:00:37