
Openai Tts
- 70 installs
- 638 repo stars
- Updated March 7, 2026
- sundial-org/awesome-openclaw-skills
Helps with ai & agent building tasks during AI-assisted development.
About
openai-tts is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- openai-tts
- AI & Agent Building
- AI-coding skill
Openai Tts by the numbers
- 70 all-time installs (skills.sh)
- Ranked #5,726 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/sundial-org/awesome-openclaw-skills --skill openai-ttsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 70 |
|---|---|
| repo stars | ★ 638 |
| Last updated | March 7, 2026 |
| Repository | sundial-org/awesome-openclaw-skills ↗ |
What it does
Helps with ai & agent building tasks during AI-assisted development.
Files
OpenAI TTS (curl)
Generate speech from text via OpenAI's /v1/audio/speech endpoint.
Quick start
{baseDir}/scripts/speak.sh "Hello, world!"
{baseDir}/scripts/speak.sh "Hello, world!" --out /tmp/hello.mp3Defaults:
- Model:
tts-1(fast) ortts-1-hd(quality) - Voice:
alloy(neutral), also:echo,fable,onyx,nova,shimmer - Format:
mp3
Voices
| Voice | Description |
|---|---|
| alloy | Neutral, balanced |
| echo | Male, warm |
| fable | British, expressive |
| onyx | Deep, authoritative |
| nova | Female, friendly |
| shimmer | Female, soft |
Flags
{baseDir}/scripts/speak.sh "Text" --voice nova --model tts-1-hd --out speech.mp3
{baseDir}/scripts/speak.sh "Text" --format opus --speed 1.2Options:
--voice <name>: alloy|echo|fable|onyx|nova|shimmer (default: alloy)--model <name>: tts-1|tts-1-hd (default: tts-1)--format <fmt>: mp3|opus|aac|flac|wav|pcm (default: mp3)--speed <n>: 0.25-4.0 (default: 1.0)--out <path>: output file (default: stdout or auto-named)
API key
Set OPENAI_API_KEY, or configure in ~/.clawdbot/clawdbot.json:
{
skills: {
entries: {
"openai-tts": {
apiKey: "sk-..."
}
}
}
}Pricing
- tts-1: ~$0.015 per 1K characters
- tts-1-hd: ~$0.030 per 1K characters
Very affordable for short responses!
#!/usr/bin/env bash
set -euo pipefail
usage() {
cat >&2 <<'EOF'
Usage:
speak.sh <text> [--voice alloy] [--model tts-1] [--format mp3] [--speed 1.0] [--out /path/to/out.mp3]
Voices: alloy, echo, fable, onyx, nova, shimmer
Models: tts-1 (fast), tts-1-hd (quality)
Formats: mp3, opus, aac, flac, wav, pcm
Speed: 0.25 to 4.0
EOF
exit 2
}
if [[ "${1:-}" == "" || "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
usage
fi
text="${1:-}"
shift || true
voice="alloy"
model="tts-1"
format="mp3"
speed="1.0"
out=""
while [[ $# -gt 0 ]]; do
case "$1" in
--voice)
voice="${2:-}"
shift 2
;;
--model)
model="${2:-}"
shift 2
;;
--format)
format="${2:-}"
shift 2
;;
--speed)
speed="${2:-}"
shift 2
;;
--out)
out="${2:-}"
shift 2
;;
*)
echo "Unknown arg: $1" >&2
usage
;;
esac
done
if [[ "${OPENAI_API_KEY:-}" == "" ]]; then
echo "Missing OPENAI_API_KEY" >&2
exit 1
fi
# Build JSON payload
json=$(cat <<EOF
{
"model": "${model}",
"input": $(printf '%s' "$text" | jq -Rs .),
"voice": "${voice}",
"response_format": "${format}",
"speed": ${speed}
}
EOF
)
if [[ "$out" == "" ]]; then
# Output to stdout
curl -sS https://api.openai.com/v1/audio/speech \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d "$json"
else
# Output to file
mkdir -p "$(dirname "$out")"
curl -sS https://api.openai.com/v1/audio/speech \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d "$json" \
-o "$out"
echo "$out"
fi
Related skills
AI & Agent Buildingagents