zai-tts — Claude Code skill: text to speech with GLM-TTS
A skill that turns text into audio through the GLM-TTS service. Useful when you would rather listen to an agent's answer than read it.
npx skills add aahl/skills --skill zai-tts -a claude-codeWhat zai-tts does
The skill shells out to uvx zai-tts and writes a wav file. Pass a string with -t or a whole file with -f, and set the output path with -o. Speed and volume come from --speed and --volume.
Pick a voice with --voice. Three system voices ship with it: system_001 (Lila), system_002 (Chloe) and system_003 (Ethan). Run uvx zai-tts -l to list everything available. Custom voices have to be cloned on audio.z.ai first.
Two environment variables are required before the first run: ZAI_AUDIO_USERID and ZAI_AUDIO_TOKEN. Log in to audio.z.ai, open the developer console with F12 and run localStorage['auth-storage'] to get both values. Skip that step and the command fails, so set them up first.
What it helps with
- turn a long agent answer into audio for listening on the move
- generate a wav from a text file in one command
- swap voice or speed for a specific recording
- list the available voices before committing to one
- use a pre-cloned voice for speech generation
Example prompts for the agent
- read this text aloud with tts and save it as wav
- make audio from notes.txt using the system_002 voice
- speak the answer at speed 1.5 and volume 2
How to install zai-tts
1Skills CLI (Vercel)
npx skills add aahl/skills --skill zai-tts -a claude-code2Manually: put the files in place
~/.claude/skills/zai-tts/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/zai-tts/
1Skills CLI (Vercel)
npx skills add aahl/skills --skill zai-tts -a codex2Manually: put the files in place
.agents/skills/zai-tts/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aahl/skills --skill zai-tts -a cursor2Manually: put the files in place
.cursor/skills/zai-tts/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aahl/skills zai-tts2Manually: put the files in place
.github/skills/zai-tts/SKILL.md1Skills CLI (Vercel)
npx skills add aahl/skills --skill zai-tts -a gemini-cli2Platform CLI
gemini skills install https://github.com/aahl/skills --path skills/zai-ttsManually: put the files in place
.devin/skills/zai-tts/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aahl/skills --skill zai-tts -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about zai-tts
How do I install zai-tts in Claude?
Run npx skills add aahl/skills --skill zai-tts -a claude-code. The skill file then sits at ~/.claude/skills/zai-tts/SKILL.md.
What does zai-tts do?
It generates audio from text through the GLM-TTS service by calling uvx zai-tts. The result is a wav file.
What has to be configured before the first run?
The ZAI_AUDIO_USERID and ZAI_AUDIO_TOKEN environment variables. Both values come from logging in to audio.z.ai and reading them in the developer console.
Source text
SKILL.md · MIT
---
name: zai-tts
description: Text-to-speech conversion using GLM-TTS service via the `uvx zai-tts` command for generating audio from text. Use when (1) User requests audio/voice output with the "tts" trigger or keyword. (2) Content needs to be spoken rather than read (multitasking, accessibility, podcast, driving, cooking). (3) Using pre-cloned voices for speech.
---
# Zai-TTS
Generate high-quality text-to-speech audio using GLM-TTS service via the `uvx zai-tts` command.
Before using this skill, you need to configure the environment variables `ZAI_AUDIO_USERID` and `ZAI_AUDIO_TOKEN`,
which can be obtained by login `audio.z.ai` and executing `localStorage['auth-storage']` in the console via F12 Developer Tools.
## Usage
```shell
uvx zai-tts -t "{msg}" -o {tempdir}/{filename}.wav
uvx zai-tts -f path/to/file.txt -o {tempdir}/{filename}.wav
```
## Changing speed, volume
```shell
uvx zai-tts -t "{msg}" -o {tempdir}/{filename}.wav --speed 1.5
uvx zai-tts -t "{msg}" -o {tempdir}/{filename}.wav --speed 1.5 --volume 2
```
## Changing the voice
```shell
uvx zai-tts -t "{msg}" -o {tempdir}/{filename}.wav --voice system_002
```
## Available voices
`system_001`: Lila. A cheerful, standard-pronunciation female voice
`system_002`: Chloe. A gentle, elegant, intelligent female voice
`system_003`: Ethan. A sunny, standard-pronunciation male voice
Retrieve all available voices using shell commands:
```shell
uvx zai-tts -l
```
If you want to use custom voices, please complete voice cloning on the website `audio.z.ai` first.
© aahl · MIT · aahl/skills