Agent skill

Openai Tts

by benchflow-ai in benchflow-ai/skillsbench

OpenAI Text-to-Speech API for high-quality speech synthesis.

Apache-2.0Auto-check passedMedia & Creative

Install Openai Tts

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill openai-tts -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench openai-tts --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks-extra/pg-essay-to-audiobook/environment/skills/openai-tts .claude/skills/openai-tts && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
openai-tts
GitHub stars
1.8k
Token cost
~946 tokens
SKILL.md length
150 words
Files
1
Skills in repo
189
Repo updated
First seen
Licence
Apache-2.0

At a glance

OpenAI Text-to-Speech API for high-quality speech synthesis.

  • Generating natural-sounding audio from text with customizable voices and tones
  • SKILL.md covers Authentication, Models, Voice Options and Python Example, plus 3 more sections
  • Needs OPENAI_API_KEY
  • Tasks that involve Text to speech and voice

What it does

Openai Tts is an agent skill from benchflow-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.

Its SKILL.md is about 950 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Media & Creative, covering Text to speech and voice. It works with OpenAI. The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

When your agent uses it

  • Generating natural-sounding audio from text with customizable voices and tones
  • Tasks that involve Text to speech and voice

Example prompts

  • “/openai-tts”

Requirements

  • Python 3
  • A credential in OPENAI_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Openai Tts loads about 946 tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 150 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~946

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 150 words, ~946 tokens.

Download SKILL.mdSave it as .claude/skills/openai-tts/SKILL.md (or your agent's skills folder).
name
openai-tts
description
OpenAI Text-to-Speech API for high-quality speech synthesis. Use for generating natural-sounding audio from text with customizable voices and tones.

OpenAI Text-to-Speech

Generate high-quality spoken audio from text using OpenAI's TTS API.

Authentication

The API key is available as environment variable:

bash
OPENAI_API_KEY

Models

  • gpt-4o-mini-tts - Newest, most reliable. Supports tone/style instructions.
  • tts-1 - Lower latency, lower quality
  • tts-1-hd - Higher quality, higher latency

Voice Options

Built-in voices (English optimized):

  • alloy, ash, ballad, coral, echo, fable
  • nova, onyx, sage, shimmer, verse
  • marin, cedar - Recommended for best quality

Note: tts-1 and tts-1-hd only support: alloy, ash, coral, echo, fable, onyx, nova, sage, shimmer.

Python Example

python
from pathlib import Path
from openai import OpenAI

client = OpenAI()  # Uses OPENAI_API_KEY env var

# Basic usage
with client.audio.speech.with_streaming_response.create(
    model="gpt-4o-mini-tts",
    voice="coral",
    input="Hello, world!",
) as response:
    response.stream_to_file("output.mp3")

# With tone instructions (gpt-4o-mini-tts only)
with client.audio.speech.with_streaming_response.create(
    model="gpt-4o-mini-tts",
    voice="coral",
    input="Today is a wonderful day!",
    instructions="Speak in a cheerful and positive tone.",
) as response:
    response.stream_to_file("output.mp3")

Handling Long Text

For long documents, split into chunks and concatenate:

python
from openai import OpenAI
from pydub import AudioSegment
import tempfile
import re
import os

client = OpenAI()

def chunk_text(text, max_chars=4000):
    """Split text into chunks at sentence boundaries."""
    sentences = re.split(r'(?<=[.!?])\s+', text)
    chunks = []
    current_chunk = ""

    for sentence in sentences:
        if len(current_chunk) + len(sentence) < max_chars:
            current_chunk += sentence + " "
        else:
            if current_chunk:
                chunks.append(current_chunk.strip())
            current_chunk = sentence + " "

    if current_chunk:
        chunks.append(current_chunk.strip())

    return chunks

def text_to_audiobook(text, output_path):
    """Convert long text to audio file."""
    chunks = chunk_text(text)
    audio_segments = []

    for chunk in chunks:
        with tempfile.NamedTemporaryFile(suffix='.mp3', delete=False) as tmp:
            tmp_path = tmp.name

        with client.audio.speech.with_streaming_response.create(
            model="gpt-4o-mini-tts",
            voice="coral",
            input=chunk,
        ) as response:
            response.stream_to_file(tmp_path)

        segment = AudioSegment.from_mp3(tmp_path)
        audio_segments.append(segment)
        os.unlink(tmp_path)

    # Concatenate all segments
    combined = audio_segments[0]
    for segment in audio_segments[1:]:
        combined += segment

    combined.export(output_path, format="mp3")

Output Formats

  • mp3 - Default, general use
  • opus - Low latency streaming
  • aac - Digital compression (YouTube, iOS)
  • flac - Lossless compression
  • wav - Uncompressed, low latency
  • pcm - Raw samples (24kHz, 16-bit)
python
with client.audio.speech.with_streaming_response.create(
    model="gpt-4o-mini-tts",
    voice="coral",
    input="Hello!",
    response_format="wav",  # Specify format
) as response:
    response.stream_to_file("output.wav")

Best Practices

  • Use marin or cedar voices for best quality
  • Split text at sentence boundaries for long content
  • Use wav or pcm for lowest latency
  • Add instructions parameter to control tone/style (gpt-4o-mini-tts only)

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in tasks-extra/pg-essay-to-audiobook/environment/skills/openai-tts of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Openai Tts next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Openai Tts compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Openai Tts this skillbenchflow-ai/skillsbench1.8k—~946Automated safety check: PassApache-2.0
SpeechJetBrains/skills3663 repos~1.9kAutomated safety check: PassApache-2.0
Podcastteam-attention/plugins-for-claude-natives827—~1.5kAutomated safety check: PassMIT
Voxclawmalpern/VoxClaw208—~1.9kAutomated safety check: PassNone
Lessongug007/lpm152—~1.2kAutomated safety check: PassMIT
Speechdavila7/claude-code-templates33k—~2kAutomated safety check: PassApache-2.0

Similar skills

  • Speech

    JetBrains/skills

    Official

    A skill your agent uses when the user asks for text-to-speech narration or voiceover, accessibility reads, audio prompts, or batch speech generation via the OpenAI Audio API; run the bundled CLI…

    366 GitHub starsUsed in 3 repos~1.9k tokens
    Media & CreativeAuto-check passed
  • Podcast

    team-attention/plugins-for-claude-natives

    Generate Korean podcast episodes from any source (URLs, tweets, articles, PDFs) — analyzes content, writes a script, generates audio via OpenAI TTS, converts to MP4, and auto-uploads to YouTube.

    827 GitHub stars~1.5k tokensUpdated 5 mo ago
    Media & CreativeAuto-check passed
  • Voxclaw

    malpern/VoxClaw

    Give your agent a voice. An agent skill from malpern/VoxClaw.

    208 GitHub stars~1.9k tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed
  • Lesson

    gug007/lpm

    Make a narrated lesson video about lpm from the real desktop app, recorded on a pristine data directory.

    152 GitHub stars~1.2k tokensUpdated today
    Media & CreativeAuto-check passed
  • Speech

    davila7/claude-code-templates

    A skill your agent uses when the user asks for text-to-speech narration or voiceover, accessibility reads, audio prompts, or batch speech generation.

    33k GitHub stars~2k tokensUpdated today
    Media & CreativeAuto-check passed
  • Speech

    nexu-io/open-design

    Generate spoken audio from text using OpenAI's API with built-in voices.

    100k GitHub stars~291 tokensUpdated today
    Media & CreativeAuto-check passed

More from benchflow-ai/skillsbench

All 189 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Openai Tts

What does Openai Tts do?

OpenAI Text-to-Speech API for high-quality speech synthesis. Openai Tts is an agent skill from benchflow-ai/skillsbench. OpenAI Text-to-Speech API for high-quality speech synthesis.

When should I use Openai Tts?

Openai Tts fits situations like: generating natural-sounding audio from text with customizable voices and tones; tasks that involve Text to speech and voice.

How do I install Openai Tts in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill openai-tts -a claude-code`. Or copy the skill folder (tasks-extra/pg-essay-to-audiobook/environment/skills/openai-tts in benchflow-ai/skillsbench) into .claude/skills/openai-tts in your project. Claude Code loads it when a task matches its description.

How do I install Openai Tts in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill openai-tts -a codex`. Or copy the skill folder (tasks-extra/pg-essay-to-audiobook/environment/skills/openai-tts in benchflow-ai/skillsbench) into .agents/skills/openai-tts in your project. Codex loads it when a task matches its description.

Can I use Openai Tts in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill openai-tts -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/openai-tts, .gemini/skills/openai-tts, .github/skills/openai-tts and .opencode/skills/openai-tts in your project.

What does Openai Tts need to run?

Going by SKILL.md and its folder, Openai Tts needs credentials named OPENAI_API_KEY. Our summary lists: Python 3; A credential in OPENAI_API_KEY.

Does Openai Tts access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Openai Tts safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Openai Tts use?

Openai Tts is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Openai Tts use?

About 946 tokens (SKILL.md is roughly 3.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Openai Tts?

Skills that share tags, products or a category with Openai Tts: Speech (JetBrains/skills, 366 stars), Podcast (team-attention/plugins-for-claude-natives, 827 stars), Voxclaw (malpern/VoxClaw, 208 stars) and Lesson (gug007/lpm, 152 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Openai Tts?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,835 GitHub stars. The repository holds 189 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.