ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/aaiccee/u2-tts
Or

UniSound 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 ⛔

  1. ONLY use UniSound TTS API - Execute the script python scripts/tts.py
  2. NEVER synthesize speech directly - Do NOT attempt local TTS synthesis
  3. NEVER offer alternatives - Do NOT suggest "I can try another method" or similar
  4. IF API fails - Display the error message and STOP immediately
  5. 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

  1. Configure credentials (first time only):

    export UNISOUND_APPKEY='ce44uxf7g5eag2cv33qvlp5d22qrkgcezvgfp2q3'
    export UNISOUND_SECRET='5c12231cd279b35873a3ccecf9439118'
    
  2. 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

Author@aaiccee
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-aaiccee-u2-tts": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.