j3k0/speech.sh logo

j3k0/speech.sh

Free

让代理大声说出内容,并在工作完成时用简短摘要通知你。

FreeFree tier
Inputs: text
Type
Open Source

About j3k0/speech.sh

speech.sh is a text-to-speech CLI and MCP (Model Context Protocol) server that uses the Groq TTS API (OpenAI-compatible). It converts text input into spoken audio with support for multiple voices, adjustable speech speed, hash-based caching to avoid duplicate API calls, and retry with exponential backoff. The tool includes a shell-based TTS engine and two MCP server implementations (Python and shell) for integration with AI assistants like Claude Desktop and Claude Code. It depends on common utilities (curl, jq) and audio players (ffplay, mplayer, VLC). Licensed under GPL.

Key Features

Convert text to speech via simple CLI command
Multiple voice options: troy, austin, hannah, autumn
Adjustable speech speed (default 1.0)
Hash-based caching with 24-hour auto-cleanup to avoid duplicate API calls
Retry mechanism with exponential backoff
Audio playback via ffplay, mplayer, or VLC
MCP server for integration with AI assistants (Claude Desktop, Claude Code)
Two implementations: Python (recommended) and shell (legacy)
Environment variable configuration for voice, speed, and model

Pros & Cons

Pros
  • Free and open source (GPL licensed)
  • Simple setup with minimal dependencies
  • Supports multiple voices and adjustable speed
  • Caching reduces API usage and costs
  • Provides MCP integration for AI assistants
  • Multiple audio player options for playback
Cons
  • Requires a Groq API key and internet connection
  • Only works with Groq TTS API, not a standalone TTS engine
  • Shell MCP server may have macOS sandboxing issues with Claude Desktop
  • Dependencies: curl, jq, and an audio player must be installed

Best For

Text-to-speech for accessibility and assistive technologyVoice backup when user's voice is temporarily brokenAI assistant integration to speak responses aloudAutomated voice notifications from scripts or workflows

FAQ

What API does speech.sh use?
It uses the Groq TTS API which is OpenAI-compatible. The default model is canopylabs/orpheus-v1-english.
How do I install speech.sh?
Clone the repository from GitHub, set the OPENAI_API_KEY environment variable or provide it via --api_key, and ensure curl, jq, and an audio player (ffplay, mplayer, or VLC) are installed.
Can I use speech.sh with Claude?
Yes, speech.sh includes an MCP server compatible with Claude Desktop and Claude Code. Configure the MCP server in your Claude settings using the provided JSON configuration.
What voices are available?
The available voices are troy, austin, hannah, and autumn. The default voice is troy.