agentleFS
joargpjoargp/skills/openai-tts/SKILL.md

openai-tts

Skill1 starsChanged 10 months agoMITView on GitHub

This skill should be used when generating voice notes or audio responses. Use OpenAI's TTS API to convert text to speech and send audio messages back to users.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. sonichi/sutando★ 396same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Recommended: Use gpt-4o-mini-tts — better quality and 25x cheaper than legacy models.

    line 54
  2. Very specific:

    Use onyx or echo for professional/calm tone

    line 119
  3. Very specific:

    Use nova for friendly/upbeat messages

    line 120
  4. Distinctive:

    Keep messages concise (under 1 minute ideal)

    line 121
  5. Very specific:

    Use opus format for smaller file sizes

    line 122
  6. Very specific:

    Always use gpt-4o-mini-tts (best quality, lowest cost)

    line 123

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OpenAI Text-to-Speech (TTS)

Overview

Generate voice notes using OpenAI's TTS API. Useful for sending audio responses to users on Telegram, WhatsApp, etc.

Requirements

  • OPENAI_API_KEY environment variable set

Quick Usage

curl -s https://api.openai.com/v1/audio/speech \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini-tts",
    "input": "Your text here",
    "voice": "onyx"
  }' \
  --output /tmp/voice.mp3

Then send with: MEDIA:/tmp/voice.mp3

Available Voices

VoiceDescription
alloyNeutral, balanced
ashClear, direct
coralWarm, approachable
echoWarm, conversational
fableBritish, storytelling
onyxDeep, authoritative
novaFriendly, upbeat
sageCalm, thoughtful
shimmerSoft, gentle

Models

ModelDescriptionCost
gpt-4o-mini-ttsLatest, best quality$0.60/1M input chars
tts-1Standard (legacy)$15/1M chars
tts-1-hdHigh quality (legacy)$30/1M chars

Recommended: Use gpt-4o-mini-tts — better quality and 25x cheaper than legacy models.

Parameters

{
  "model": "gpt-4o-mini-tts",
  "input": "Text to speak",   // Max 4096 characters
  "voice": "onyx",            // See voices above
  "response_format": "mp3",   // mp3, opus, aac, flac, wav, pcm
  "speed": 1.0                // 0.25 to 4.0
}

Examples

Norwegian voice note

curl -s https://api.openai.com/v1/audio/speech \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini-tts",
    "input": "Hei! Dette er en stemmenote på norsk.",
    "voice": "nova"
  }' \
  --output /tmp/norwegian.mp3

With slower speed

curl -s https://api.openai.com/v1/audio/speech \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini-tts",
    "input": "Important announcement...",
    "voice": "onyx",
    "speed": 0.9
  }' \
  --output /tmp/announcement.mp3

Opus format (smaller files)

curl -s https://api.openai.com/v1/audio/speech \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini-tts",
    "input": "Compact audio message",
    "voice": "alloy",
    "response_format": "opus"
  }' \
  --output /tmp/message.opus

Workflow

  1. Generate audio with curl
  2. Save to /tmp/voice-{timestamp}.mp3
  3. Send with MEDIA:/tmp/voice-{timestamp}.mp3

Best Practices

  • Use onyx or echo for professional/calm tone
  • Use nova for friendly/upbeat messages
  • Keep messages concise (under 1 minute ideal)
  • Use opus format for smaller file sizes
  • Always use gpt-4o-mini-tts (best quality, lowest cost)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.