dbccccccc/ttsfm

TTSFM mirrors OpenAI's TTS service, providing a compatible interface for text-to-speech conversion with multiple voice options for free.

What it solves

TTSFM provides a free, OpenAI-compatible API service for converting text to natural-sounding speech. It acts as a bridge to the openai.fm backend, allowing users to integrate high-quality text-to-speech (TTS) capabilities into their applications without needing to use OpenAI's official paid services directly.

How it works

The project is a reverse-engineered implementation of the openai.fm service. It provides a RESTful API that mimics OpenAI's TTS endpoints, a Python SDK for synchronous and asynchronous requests, and a WebSocket for real-time streaming. To handle advanced audio processing—such as speed adjustments (0.25x to 4.0x) and conversion between six different audio formats—it utilizes ffmpeg in its full Docker image variant.

Who it’s for

Developers and researchers who need an OpenAI-compatible TTS interface for their projects, as well as users who want a simple way to deploy a TTS server via Docker or use a Python library to generate speech from text.

Highlights

  • OpenAI Compatibility: Serves as a drop-in replacement for OpenAI's TTS API.
  • Extensive Audio Options: Supports 11 different voices and 6 audio formats (MP3, WAV, OPUS, AAC, FLAC, PCM).
  • Long Text Handling: Automatically splits and combines audio for content of any length.
  • Flexible Deployment: Offers both a full Docker image for advanced features and a slim image for basic functionality.
  • Integrated Tools: Includes a web playground for testing and experimentation and a Python SDK.

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Project