GLM-TTS-Clone is a voice cloning model launched by Zhipu. With just a 3-second voice sample, it can learn the speaker's timbre and speech habits, and can generate natural, smooth, and human-like voices in scenarios such as general reading, emotional dubbing, educational evaluation, e-books, and voice customer service.Usage Steps Call the file upload interface to upload an audio file (size limit: no more than 10M, recommended audio duration: 3-30 seconds) to obtain the file id (id) Call the voice cloning interface to obtain the voice id (voice) Call GLM-TTS to generate audio with this voicePrice: 0.9 PTC per use
Request
Header Params
Body Params application/json
Example
{"model":"glm-tts-clone","voice_name":"my_custom_voice_001hmr","input":"Welcome to our voice replication service, which will generate speech with the same timbre as the sample audio.","file_id":"1765763613033-11fae2aaf7e845c1b2a716ce7052e6bc.mp3","text":"Hello, this is the text content of a sample audio clip, used for sound reproduction reference."}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.302.ai/bigmodel/api/paas/v4/voice/clone' \
--header'Authorization: Bearer ' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "glm-tts-clone",
"voice_name": "my_custom_voice_001hmr",
"input": "Welcome to our voice replication service, which will generate speech with the same timbre as the sample audio.",
"file_id": "1765763613033-11fae2aaf7e845c1b2a716ce7052e6bc.mp3",
"text": "Hello, this is the text content of a sample audio clip, used for sound reproduction reference."
}'