{"name":"TTSFM: OpenAI-Compatible Text-to-Speech API Service (Project Notice)","description":"TTSFM was a project designed to mirror OpenAI's TTS service, offering a compatible API for free text-to-speech conversion with multiple voice options. Built on the openai.fm backend, it provided a Python SDK, RESTful API, and a web playground for easy testing and integration. Please note, the project is no longer functional as the openai.fm demo website has been shut down.","github":"https://github.com/dbccccccc/ttsfm","url":"https://osrepos.com/repo/dbccccccc-ttsfm","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/dbccccccc-ttsfm","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/dbccccccc-ttsfm.md","json":"https://osrepos.com/repo/dbccccccc-ttsfm.json","topics":["ai","api","openai","text-to-speech","python","self-hosted","reverse-proxy","tts"],"keywords":["ai","api","openai","text-to-speech","python","self-hosted","reverse-proxy","tts"],"stars":null,"summary":"TTSFM was a project designed to mirror OpenAI's TTS service, offering a compatible API for free text-to-speech conversion with multiple voice options. Built on the openai.fm backend, it provided a Python SDK, RESTful API, and a web playground for easy testing and integration. Please note, the project is no longer functional as the openai.fm demo website has been shut down.","content":"## Introdução\n\nTTSFM was an open-source project that aimed to provide a free, OpenAI-compatible text-to-speech API service. It offered a comprehensive solution for converting text into natural-sounding speech, leveraging the openai.fm backend, which was based on OpenAI's GPT-4o mini TTS. The project included a powerful Python SDK, RESTful API endpoints, and an intuitive web playground for testing and integration.\n\n**?? NOTICE: This project is no longer functional as the openai.fm demo website has been shut down.**\n\nKey features that TTSFM offered included:\n*   **Multiple Voices**: A selection of 11 OpenAI-compatible voices (alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse).\n*   **Flexible Audio Formats**: Support for 6 audio formats (MP3, WAV, OPUS, AAC, FLAC, PCM).\n*   **Speed Control**: Adjustable playback speed from 0.25x to 4.0x.\n*   **Long Text Support**: Automatic text splitting and audio combining for extended content.\n*   **Real-time Streaming**: WebSocket support for streaming audio generation.\n*   **Python SDK**: Easy-to-use synchronous and asynchronous clients.\n*   **Web Playground**: An interactive web interface for testing and experimentation.\n*   **Docker Ready**: Pre-built Docker images for instant deployment.\n*   **OpenAI Compatible**: Designed as a drop-in replacement for OpenAI's TTS API.\n\n## Instalação\n\nAlthough the project is no longer functional, for historical and educational purposes, here were the installation methods:\n\n### Python package\n\nbash\npip install ttsfm        # core client\npip install ttsfm[web]   # core client + web/server dependencies\n\n\n### Docker image\n\nTTSFM offered two Docker image variants:\n\n#### Full variant (recommended)\nbash\ndocker run -p 8000:8000 dbcccc/ttsfm:latest\n\nThis variant included ffmpeg for advanced features like all 6 audio formats, speed adjustment, and format conversion.\n\n#### Slim variant - ~100MB\nbash\ndocker run -p 8000:8000 dbcccc/ttsfm:slim\n\nThis minimal image provided basic TTS functionality with MP3 and WAV formats only, without speed adjustment or advanced conversion.\n\nThe container exposed the web playground at `http://localhost:8000` and an OpenAI-compatible endpoint at `/v1/audio/speech`.\n\n## Exemplos\n\nHere are examples of how TTSFM could be used:\n\n### Python client\n\npython\nfrom ttsfm import TTSClient, AudioFormat, Voice\n\nclient = TTSClient()\n\n# Basic usage\nresponse = client.generate_speech(\n    text=\"Hello from TTSFM!\",\n    voice=Voice.ALLOY,\n    response_format=AudioFormat.MP3,\n)\nresponse.save_to_file(\"hello\")  # -> hello.mp3\n\n# With speed adjustment (requires ffmpeg)\nresponse = client.generate_speech(\n    text=\"This will be faster!\",\n    voice=Voice.NOVA,\n    response_format=AudioFormat.MP3,\n    speed=1.5,  # 1.5x speed (0.25 - 4.0)\n)\nresponse.save_to_file(\"fast\")  # -> fast.mp3\n\n\n### CLI\n\nbash\nttsfm \"Hello, world\" --voice nova --format mp3 --output hello.mp3\n\n\n### REST API (OpenAI-compatible)\n\nbash\n# Basic request\ncurl -X POST http://localhost:8000/v1/audio/speech \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"tts-1\",\n    \"input\": \"Hello world!\",\n    \"voice\": \"alloy\",\n    \"response_format\": \"mp3\"\n  }' --output speech.mp3\n\n# With speed adjustment (requires full image)\ncurl -X POST http://localhost:8000/v1/audio/speech \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"tts-1\",\n    \"input\": \"Hello world!\",\n    \"voice\": \"alloy\",\n    \"response_format\": \"mp3\",\n    \"speed\": 1.5\n  }' --output speech_fast.mp3\n\n\n## Porquê usar (Historical Context)\n\nTTSFM was a significant project for several reasons, even though it is no longer active. It demonstrated how an OpenAI-compatible text-to-speech service could be self-hosted and offered for free, providing an alternative for developers. Its comprehensive feature set, including multiple voices, audio formats, speed control, and long text support, made it a versatile tool for various applications. The project's Python SDK and Docker readiness also highlighted its ease of integration and deployment.\n\n**?? Disclaimer**: This project was intended for educational and research purposes only. It was a reverse-engineered implementation of the openai.fm service and was not recommended for commercial use or in production environments. Users were responsible for ensuring compliance with applicable laws and terms of service.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/dbccccccc/ttsfm](https://github.com/dbccccccc/ttsfm){target=\"_blank\" rel=\"noopener noreferrer\"}\n*   **Docker Hub**: [https://hub.docker.com/r/dbcccc/ttsfm](https://hub.docker.com/r/dbcccc/ttsfm){target=\"_blank\" rel=\"noopener noreferrer\"}\n*   **License**: [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT){target=\"_blank\" rel=\"noopener noreferrer\"}","metrics":{"detailViews":1,"githubClicks":12},"dates":{"published":null,"modified":"2026-03-01T20:38:05.000Z"}}