TTS
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
Install
npx skills add jjyaoao/HelloAgents --skill TTS -g -a claude-code -y- Repository
- jjyaoao/HelloAgents3.3k
- Category
- Media
- Updated
- 29d ago
- License
- MIT
- Context cost
- Mediumabout 3,000 tokens
- Runs scripts
- Yes, review before use
What it does
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to convert text into natural-sounding speech, create audio content, build voice-enabled applications, or generate spoken audio files. Supports multiple voices, adjustable speed, and various audio formats.
TTS (Text to Speech) Skill
This skill guides the implementation of text-to-speech (TTS) functionality using the z-ai-web-dev-sdk package, enabling conversion of text into natural-sounding speech audio.
Skills Path
Skill Location: {project_path}/skills/TTS
This skill is located at the above path in your project.
Reference Scripts: Example test scripts are available in the {Skill Location}/scripts/ directory for quick testing and reference. See {Skill Location}/scripts/tts.ts for a working example.
Overview
Text-to-Speech allows you to build applications that generate spoken audio from text input, supporting various voices, speeds, and output formats for diverse use cases.
IMPORTANT: z-ai-web-dev-sdk MUST be used in backend code only. Never use it in client-side code.
API Limitations and Constraints
Before implementing TTS functionality, be aware of these important limitations:
Input Text Constraints
- Maximum length: 1024 characters per request
- Text exceeding this limit must be split into smaller chunks
Audio Parameters
- Speed range: 0.5 to 2.0
- 0.5 = half speed (slower)
- 1.0 = normal speed (default)
- 2.0 = double speed (faster)
- Volume range: Greater than 0, up to 10
- Default: 1.0
- Values must be greater than 0 (exclusive) and up to 10 (inclusive)
Format and Streaming
- Streaming limitation: When
stream: trueis enabled, onlypcmformat is supported - Non-streaming: Supports
wav,pcm, andmp3formats - Sample rate: 24000 Hz (recommended)


