TTS
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
Skill by origin-labs-ai
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/origin-labs-ai-tts
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
TTS- Description
- 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.
- License
- MIT
- Instructions
- 731 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- body: 731 lines (spec recommends under 500)
Files (3)
- LICENSE.txt
- SKILL.md
- tts.ts
SKILL.md (first lines)
# 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: true` is enabled, only `pcm` format is supported
- **Non-streaming**: Supports `wav`, `pcm`, and `mp3` formats
- **Sample rate**: 24000 Hz (recommended)
### Best Practice for Long Text
```javascript
function splitTextIntoChunks(text, maxLength = 1000) {
const chunks = [];
const sentences = text.match(/[^.!?]+[.!?]+/g) || [text];
let currentChunk = '';
for (const sentence of sentences) {
if ((currentChunk + sentence).length <= maxLength) {
currentChunk += sentence;
} else {
if (currentChunk) chunks.push(currentChunk.trim());
currentChunk = sentence;
}
}
if (currentChunk) chunks.push(currentChunk.trim());
return chunks;
}
```
## Prerequisites
The z-ai-web-dev-sdk package is already installed. Import it as shown in the examples below.
## CLI Usage (For Simple Tasks)
For simple text-to-speech conversions, you can use the z-ai CLI instead of writing code. This is ideal for quick audio generation, testing voices, or simple automation.
### Basic TTS
```bash
# Convert text to speech (default WAV format)
z-ai tts --input "Hello, world" --output ./hello.wav
# Using short options
z-ai tts -i "Hello, world" -o ./hello.wav
```
### Different Voices and Speed
```bash
# Use specific voice
z-ai tts -i "Welcome to our service" -o ./welcome.wav --voice tongtong
# Adjust speech speed (0.5-2.0)
z-ai tts -i "This is faster speech" -o ./fast.wav --speed 1.5
# Slower speech
z-ai tts -i "This is slower speech" -o ./slow.wav --speed 0.8
```
### Different Output Formats
```bash
# MP3 format
z-ai tts -i "Hello World" -o ./hello.mp3 --format mp3
# WAV format (default)
z-ai tts -i "Hello World" -o ./hello.wav --format wav
# PCM format
z-ai tts -i "Hello World" -o ./hello.pcm --format pcm
```
### Streaming Output
```bash
# Stream audio generation
z-ai tts -i "This is a longer text that will be streamed" -o ./stream.wav --stream
```
### CLI Parameters
- `--input, -i <text>`: **Required** - Text to convert to speech (max 1024 characters)
- `--output, -o <path>`: **Required** - Output audio file path
- `--voice, -v <voice>`: Optional - Voice type (default: tongtong)
- `--speed, -s <number>`: Optional - Speech speed, 0.5-2.0 (default: 1.0)
- `--format, -f <format>`: Optional - Output format: wav, mp3, pcm (default: wav)From origin-labs-ai/code-fusion, MIT.
More from origin-labs-ai/code-fusion
- 0.529score
record-browser-gif
origin-labs-ai
Record browser or Web UI interaction demos as optimized GIFs using the available built-in browser, state-based frame capture, and deterministic encoding, then…
SkillBFreshness: BClaude Code +9 - 0.529score
xhe-prose-standard
origin-labs-ai
Use when writing, reviewing, restoring, trimming, or auditing prose in the xhe repo, including deciding where documentation or comments are required across…
SkillBFreshness: BClaude Code +9 - 0.529score
xhe-trim-cot-leakage
origin-labs-ai
Use when auditing or fixing prose that reads like a leaked reasoning transcript — dead design-session citations such as (decision N), audit item codes, or §N…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-doc-site-sync
origin-labs-ai
Use when publishing, updating, moving, or removing Xee Harness Enhanced documentation website pages; editing website/docs.ts mappings or navigation…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-doc-standards
origin-labs-ai
Use when writing, moving, reviewing, or auditing documentation in the xhe repo — choosing hierarchy and detail, separating tutorials from references, checking…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-find-simplifications
origin-labs-ai
Use when working in the xhe repo to find non-obvious simplification candidates, write proposed Agent Notes or inline TODO/FIXME/XXX notes, audit or coalesce…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-pre-push-checks
origin-labs-ai
Use before pushing, force-pushing, marking ready for review, or claiming checks pass on a xhe branch, and immediately after gh stack sync publishes rewritten…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-merging-stacked-prs
origin-labs-ai
Use when landing a stack of dependent GitHub PRs (A ← B ← C, where each bases on the one below) onto master, merging a PR whose base is another open PR's…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-archive-agent-notes
origin-labs-ai
Use when adding, auditing, pruning, archiving, restoring, or reviewing Agent Notes in xhe; checks every new note for superseded active records, classifies…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-code-review
origin-labs-ai
Use when reviewing a pull request in the xhe repo — orients the reviewer to this codebase's standards (AGENTS.md conventions, defensive patterns, ADRs…
SkillBFreshness: BClaude Code +9 - 0.521score
xhe-translate-docs
origin-labs-ai
Manually run the extended Xee Harness Enhanced bilingual-document workflow, including generated briefings, delegated prose translation, whole-document…
SkillBFreshness: BClaude Code +9 - 0.281score
xhe-popular-skills
origin-labs-ai
No description from the publisher yet.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 23, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/origin-labs-ai/code-fusion
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.419score
TTS
v-yutianran
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillDFreshness: D★ 1Claude Code +9 - 0.307score
TTS
kelvinzer0
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillBFreshness: BClaude Code +9 - 0.307score
TTS
smnshzh
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillBFreshness: BClaude Code +9 - 0.307score
TTS
byebis
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillBFreshness: BClaude Code +9 - 0.277score
TTS
jbreel77888
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillCFreshness: CClaude Code +9 - 0.277score
TTS
lucioupro2025
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillCFreshness: CClaude Code +9 - 0.277score
TTS
roman-ryzenadvanced
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillCFreshness: CClaude Code +9 - 0.247score
TTS
nordeim
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillAFreshness: AClaude Code +9 - 0.247score
TTS
nordeim
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillAFreshness: AClaude Code +9 - 0.247score
TTS
nordeim
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillAFreshness: AClaude Code +9 - 0.247score
TTS
nordeim
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillAFreshness: AClaude Code +9 - 0.247score
TTS
nordeim
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk.
SkillAFreshness: AClaude Code +9
More from origin-labs-ai
- 0.529score
record-browser-gif
origin-labs-ai
Record browser or Web UI interaction demos as optimized GIFs using the available built-in browser, state-based frame capture, and deterministic encoding, then…
SkillBFreshness: BClaude Code +9 - 0.529score
xhe-prose-standard
origin-labs-ai
Use when writing, reviewing, restoring, trimming, or auditing prose in the xhe repo, including deciding where documentation or comments are required across…
SkillBFreshness: BClaude Code +9 - 0.529score
xhe-trim-cot-leakage
origin-labs-ai
Use when auditing or fixing prose that reads like a leaked reasoning transcript — dead design-session citations such as (decision N), audit item codes, or §N…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-code-review
origin-labs-ai
Use when reviewing a pull request in the xhe repo — orients the reviewer to this codebase's standards (AGENTS.md conventions, defensive patterns, ADRs…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-doc-standards
origin-labs-ai
Use when writing, moving, reviewing, or auditing documentation in the xhe repo — choosing hierarchy and detail, separating tutorials from references, checking…
SkillBFreshness: BClaude Code +9 - 0.524score
xhe-find-simplifications
origin-labs-ai
Use when working in the xhe repo to find non-obvious simplification candidates, write proposed Agent Notes or inline TODO/FIXME/XXX notes, audit or coalesce…
SkillBFreshness: BClaude Code +9
Cite this page
TTS skill. Agent Mart. https://agentmart.dev/skills/origin-labs-ai-tts (last updated 2026-10-24)