Skip to content

Feature Request: OpenAI-compatible TTS endpoint for cloud API (api.fish.audio) #1272

Description

@altierac

Summary

We'd love to use Fish Audio's cloud API (api.fish.audio) as a TTS provider in OpenClaw, a popular open-source AI gateway with 30k+ stars. OpenClaw has built-in TTS support for OpenAI, ElevenLabs, Google, Microsoft, and MiniMax — all through a standardized speech provider interface.

Adding an OpenAI-compatible TTS endpoint (POST /v1/audio/speech) to the Fish Audio cloud API would allow Fish Audio to work as a drop-in TTS provider in OpenClaw and any other application that supports the OpenAI TTS API format.

Why This Matters

  • OpenClaw has thousands of users who could instantly use Fish Audio for voice messages across Telegram, Discord, WhatsApp, Signal, Slack, and 10+ other channels
  • Zero integration work for end users — just point messages.tts.providers.openai.baseUrl at https://api.fish.audio and set the voice ID
  • Fish Audio's S2 Pro model achieves the lowest WER on Seed-TTS Eval among all models — this quality deserves wider reach
  • Discussion How should I make it compatible with openai-api? #933 asked about this for self-hosted setups, but the cloud API (api.fish.audio) would have much broader impact

Proposed Endpoint

POST https://api.fish.audio/v1/audio/speech
Content-Type: application/json
Authorization: Bearer <token>

{
  "model": "s2-pro",
  "input": "Hello world",
  "voice": "98655a12fa944e26b274c535e5e03842",
  "response_format": "opus"
}

Where voice maps to Fish Audio's reference_id. This follows the OpenAI TTS API spec.

Current Workaround

We currently call Fish Audio's native /v1/tts endpoint via a custom Python script with msgpack serialization. It works but requires manual exec pipelines and can't use OpenClaw's built-in TTS delivery system (which handles voice note formatting, streaming, and multi-channel delivery automatically).

Impact

This would make Fish Audio accessible to the entire OpenClaw ecosystem with a single config change:

{
  "messages": {
    "tts": {
      "auto": "inbound",
      "provider": "openai",
      "providers": {
        "openai": {
          "baseUrl": "https://api.fish.audio",
          "apiKey": "your-fish-key",
          "model": "s2-pro",
          "voice": "98655a12fa944e26b274c535e5e03842"
        }
      }
    }
  }
}

Happy to help test if you decide to implement this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions