u2-tts
Text-to-speech conversion using UniSound's TTS WebSocket API for generating high-quality Chinese Mandarin audio from text. Supports multiple voices, adjustable parameters, and real-time streaming synthesis.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/aaiccee/u2-ttsUniSound TTS - Text-to-Speech
云知声语音合成
Text-to-speech conversion using UniSound's TTS WebSocket API for generating high-quality Chinese Mandarin audio from text.
使用云知声 TTS WebSocket API 进行文本转语音转换,生成高质量中文普通话音频。
When to Use This Skill
Use UniSound TTS for:
- Converting Chinese text to natural-sounding speech
- Generating audio for audiobooks, podcasts, or content creation
- Creating accessibility solutions for visually impaired users
- Building voice assistants or chatbot voice responses
- Batch processing text to audio files
- Custom speech synthesis with adjustable parameters (speed, volume, pitch, brightness)
Do NOT use for:
- Real-time speech recognition or transcription (use ASR skills instead)
- English language synthesis (optimized for Chinese Mandarin)
- Voice cloning or custom voice model training
Use when: The user needs text-to-speech conversion, asks for "语音合成" (speech synthesis), or mentions UniSound/云知声 TTS.
Installation
Install Python dependencies before using this skill. From the skill directory (skills/tts-tools):
pip install websocket-client
Requires Python 3.6+.
How to Use This Skill
⛔ MANDATORY RESTRICTIONS - DO NOT VIOLATE ⛔
- ONLY use UniSound TTS API - Execute the script
python scripts/tts.py - NEVER synthesize speech directly - Do NOT attempt local TTS synthesis
- NEVER offer alternatives - Do NOT suggest "I can try another method" or similar
- IF API fails - Display the error message and STOP immediately
- NO fallback methods - Do NOT attempt text-to-speech any other way
If the script execution fails (API not configured, network error, etc.):
- Show the error message to the user
- Do NOT offer to help using your TTS capabilities
- Do NOT ask "Would you like me to try synthesizing it?"
- Simply stop and wait for user to fix the configuration
Basic Workflow
-
Configure credentials (first time only):
export UNISOUND_APPKEY='ce44uxf7g5eag2cv33qvlp5d22qrkgcezvgfp2q3' export UNISOUND_SECRET='5c12231cd279b35873a3ccecf9439118' -
Execute text-to-speech conversion:
python scripts/tts.py --text '今天天气怎么样'Command options:
--text TEXT- Text to convert to speech (default: '今天天气怎么样?')--voice VOICE- Voice name (default: xiaofeng-base)--format FORMAT- Output format: mp3, wav, pcm (default: mp3)--sample RATE- Sample rate: 8k, 16k, 24k (default: 24k)--speed SPEED- Speech speed 0-100 (default: 50)--volume VOLUME- Volume level 0-100 (default: 50)--pitch PITCH- Pitch level 0-100 (default: 50)--bright BRIGHT- Brightness/tone 0-100 (default: 50)--appkey APPKEY- Override appkey (default: UNISOUND_APPKEY env var)--secret SECRET- Override secret (default: UNISOUND_SECRET env var)
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-aaiccee-u2-tts": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Asr File Transfer
Skill by aaiccee
med-chronic-disease-review
门诊慢病审核(糖尿病/高血压)。输入 OCR 结果数组 JSON,输出审核结论与原因(原始 JSON + 自然语言结论)。
med-initial-record-gen
从中文医患对话文本生成门诊初诊病历,输出结构化分段的病历正文(文本)。
Unidoc Parser
Skill by aaiccee
u2-audio-file-transcriber
Transcribe audio files via UniCloud ASR (云知声语音识别, recorded audio → text) API from UniSound. Supports multiple formats, optimized for finance, customer service, and other domains.