Generate speech audio URLs from text using Coze TTS.
Quick start
node {skillDir}/scripts/tts.mjs --text "Hello, welcome to our service"
node {skillDir}/scripts/tts.mjs --texts "Chapter 1" "Chapter 2" --speaker zh_male_m191_uranus_bigtts
node {skillDir}/scripts/tts.mjs --text "Fast announcement" --speech-rate 30 --format mp3 --sample-rate 48000
Options
--text <text>single text input. If both--textand--textsare provided,--texttakes precedence.--texts <texts...>multiple text inputs. Values are read until the next--flag.--speaker <id>speaker id, defaultzh_female_xiaohe_uranus_bigtts--format <fmt>audio format:mp3,pcm, orogg_opus. Default is SDK default (mp3).--sample-rate <hz>sample rate. Supported values:8000,16000,22050,24000,32000,44100,48000. Default is SDK default (24000).--speech-rate <n>speech rate adjustment, range-50to100, default0--loudness-rate <n>loudness adjustment, range-50to100, default0
Behavior
- At least one of
--textor--textsis required. - This skill currently supports plain text input only. It does not expose
ssml,--header,-H, or--mock. - The CLI prints one audio URL per generated segment. It does not download audio files locally.
- Printed audio URLs must be kept exactly intact, complete, and accurate. All URL parameters must be preserved without truncation, rewriting, omission, or reordering; in particular, parameters inside the query string such as
signmust not be dropped, otherwise the audio may be inaccessible. - Unless the user explicitly asks to download the URL content, only return the complete URL link to the user.
- The CLI does not print
audioSize, even though the underlying SDK returns it. - Invalid ranges or unsupported values are passed through to the SDK and may fail there.
Sample Rates
Supported: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz
8000-16000: Phone quality22050-24000: Standard quality (default)32000-48000: High quality
Tuning
speechRate: range-50to100, default0. Negative values slow speech down, positive values speed it up.loudnessRate: range-50to100, default0. Negative values make output quieter, positive values make it louder.
Voices
General
zh_female_xiaohe_uranus_bigtts小荷: Default, general female voicezh_female_vv_uranus_bigttsVivi: Chinese-English bilingual female voicezh_male_m191_uranus_bigtts云舟: Male voicezh_male_taocheng_uranus_bigtts小天: Male voice
Audiobook / Reading
zh_female_xueayi_saturn_bigtts雪阿姨: Children's audiobook female voice
Video Dubbing
zh_male_dayi_saturn_bigtts大一: Male voicezh_female_mizai_saturn_bigtts米仔: Female voicezh_female_jitangnv_saturn_bigtts鸡汤女: Inspirational female voicezh_female_meilinvyou_saturn_bigtts甜美女友: Sweet girlfriendzh_female_santongyongns_saturn_bigtts三通女声: General fluent female voicezh_male_ruyayichen_saturn_bigtts儒雅一尘: Elegant male voice
Roleplay
saturn_zh_female_keainvsheng_tob可爱女生: Cute girlsaturn_zh_female_tiaopigongzhu_tob俏皮公主: Playful princesssaturn_zh_male_shuanglangshaonian_tob爽朗少年: Cheerful youthsaturn_zh_male_tiancaitongzhuo_tob天才同桌: Genius deskmatesaturn_zh_female_cancan_tob灿灿: Intellectual Cancan
Notes
- The skill runtime requires
plugins.entries.coze-openclaw-plugin.config.apiKey. {skillDir}means the directory containing thisSKILL.md.- The script prints one audio URL per generated segment.
- The returned URL must be used as-is, in full, and with every parameter preserved exactly, especially query parameters such as
sign, otherwise the audio may not be accessible.