Tooluck logoTooluck
SKILL.md

openai-tts

Agent skill frombenchflow-ai/skillsbench

OpenAI Text-to-Speech API for high-quality speech synthesis. Use for generating natural-sounding audio from text with customizable voices and tones.

How to install openai-tts

install openai-tts
# install the skillsbench pack with the skills CLI
npx skills add benchflow-ai/skillsbench

# or add only this skill to Claude Code: copy the folder

tasks-extra/pg-essay-to-audiobook/environment/skills/openai-tts/

# into

~/.claude/skills/openai-tts/ (all projects)

.claude/skills/openai-tts/ (one project)

tasks-extra/pg-essay-to-audiobook/environment/skills/openai-tts/SKILL.md

Apache-2.0Full file
1# OpenAI Text-to-Speech
2
3Generate high-quality spoken audio from text using OpenAI's TTS API.
4
5## Authentication
6
7The API key is available as environment variable:
8```bash
9OPENAI_API_KEY
10```
11
12## Models
13
14- `gpt-4o-mini-tts` - Newest, most reliable. Supports tone/style instructions.
15- `tts-1` - Lower latency, lower quality
16- `tts-1-hd` - Higher quality, higher latency
17
18## Voice Options
19
20Built-in voices (English optimized):
21- `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`
22- `nova`, `onyx`, `sage`, `shimmer`, `verse`
23- `marin`, `cedar` - **Recommended for best quality**
24
25Note: `tts-1` and `tts-1-hd` only support: alloy, ash, coral, echo, fable, onyx, nova, sage, shimmer.
26
27## Python Example
28
29```python
30from pathlib import Path
31from openai import OpenAI
32
33client = OpenAI() # Uses OPENAI_API_KEY env var
34
35# Basic usage
36with client.audio.speech.with_streaming_response.create(
37 model="gpt-4o-mini-tts",
38 voice="coral",
39 input="Hello, world!",
40) as response:
41 response.stream_to_file("output.mp3")
42
43# With tone instructions (gpt-4o-mini-tts only)
44with client.audio.speech.with_streaming_response.create(
45 model="gpt-4o-mini-tts",
46 voice="coral",
47 input="Today is a wonderful day!",
48 instructions="Speak in a cheerful and positive tone.",
49) as response:
50 response.stream_to_file("output.mp3")
51```
52
53## Handling Long Text
54
55For long documents, split into chunks and concatenate:
56
57```python
58from openai import OpenAI
59from pydub import AudioSegment
60import tempfile
61…

Excerpt shown under the repository's Apache-2.0 license.

More skills in skillsbench

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

pbakaus /

impeccable
108k

The design vocabulary for your coding agent. Steer with polish and bolder, review with critique and audit, catch AI slop before it ships.

2 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates