Kitta Audio Docs
Integration GuidesThird-Party Integrations

ChatGPT CLI Setup

Configure kardolus ChatGPT CLI to generate and play MP3 speech through the Kitta Audio TTS API.

Connect Kitta Audio TTS to ChatGPT CLI

kardolus/chatgpt-cli supports a custom OpenAI URL, speech path, model, and voice. Its --speak flag can generate audio from the terminal.

Create a dedicated target

Create ~/.chatgpt-cli/config.fish-audio.yaml:

name: fish_audio
api_key: YOUR_API_KEY
url: https://fishaudio.org
speech_path: /v1/audio/speech
model: fishaudio-s21pro-flash
voice: 00a1b221-6137-4b73-ad62-b0cbce134167

Prefer a FISH_AUDIO_API_KEY environment variable or api_key_file over plaintext credentials in the configuration file.

Generate and play speech

chatgpt --target fish-audio --speak "Hello from Kitta Audio on the command line." --output speech.mp3

On macOS, run afplay speech.mp3. After the first successful request, replace the test voice in the target configuration.

Troubleshooting

  • Other chat APIs fail: use this target only with --speak, not as a chat-model target.
  • 404: keep /v1 out of url; speech_path supplies the complete route.
  • 401/402: verify the key loaded for this target and API credits.