8000 GitHub - Zeuyel/ttsfm: TTSFM is a reverse-engineered API server that mirrors OpenAI's TTS service, providing a compatible interface for text-to-speech conversion with multiple voice options.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ ttsfm Public
forked from dbccccccc/ttsfm

TTSFM is a reverse-engineered API server that mirrors OpenAI's TTS service, providing a compatible interface for text-to-speech conversion with multiple voice options.

License

Notifications You must be signed in to change notification settings

Zeuyel/ttsfm

 
 

Repository files navigation

TTSFM

Docker Pulls License GitHub Stars

⚠️ Disclaimer
This project is for learning and testing purposes only. For production environments, please use OpenAI's official TTS service.

English | 中文

🌟 Project Introduction

TTSFM is a reverse-engineered API server that is fully compatible with OpenAI's Text-to-Speech (TTS) interface.

🎮 Try it now: Official Demo Site

🏗️ Project Structure

ttsfm/
├── main.py              # Application entry
├── server/              # Core services
│   ├── api.py           # OpenAI-compatible API
│   └── handlers.py      # Request handlers
├── proxy/               # Proxy system
│   └── manager.py
├── utils/               # Utility modules
│   └── config.py
├── static/              # Frontend resources
│   ├── index.html       # English interface
│   ├── index_zh.html    # Chinese interface
│   └── ...              # JS/CSS resources
└── requirements.txt     # Python dependencies

🚀 Quick Start

System Requirements

  • Python ≥ 3.8
  • Or Docker environment

🐳 Docker Run (Recommended)

Basic usage:

docker run -p 7000:7000 dbcccc/ttsfm:latest

Custom configuration using environment variables:

docker run -d \
  -p 7000:7000 \
  -e HOST=0.0.0.0 \
  -e PORT=7000 \
  -e VERIFY_SSL=true \
  -e USE_PROXY=false \
  -e PROXY_API_URL=https://proxy.scdn.io/api/get_proxy.php \
  -e PROXY_PROTOCOL=http \
  -e PROXY_BATCH_SIZE=5 \
  -e MAX_QUEUE_SIZE=100 \
  dbcccc/ttsfm:latest

Available environment variables:

  • HOST: Server host (default: 0.0.0.0)
  • PORT: Server port (default: 7000)
  • VERIFY_SSL: Whether to verify SSL certificates (default: true)
  • USE_PROXY: Whether to use proxy pool (default: true)
  • PROXY_API_URL: Proxy API URL (default: https://proxy.scdn.io/api/get_proxy.php)
  • PROXY_PROTOCOL: Proxy protocol (default: http)
  • PROXY_BATCH_SIZE: Number of proxies to fetch at once (default: 5)
  • MAX_QUEUE_SIZE: Maximum number of tasks in queue (default: 100)

💡 Tip
MacOS users experiencing port conflicts can use alternative ports:
docker run -p 5051:7000 dbcccc/ttsfm:latest

📦 Manual Installation

  1. Download the latest release package from GitHub Releases
  2. Extract and enter the directory:
tar -zxvf ttsfm-vX.X.X.tar.gz
cd ttsfm-vX.X.X
  1. Install dependencies and launch:
pip install -r requirements.txt
cp .env.example .env  # Edit config as needed
python main.py

📚 Usage Guide

Web Interface

Access http://localhost:7000 to experience the interactive demo

API Endpoints

Endpoint Method Description
/v1/audio/speech POST Text-to-Speech
/api/queue-size GET Query task queue

🔍 Complete API documentation is available via the web interface after local deployment

🧪 Stress Testing

# Basic test
python pressure_test.py

# Custom test example
python pressure_test.py -n 50 -c 10 -t long -s

Parameter Explanation:

  • -n Total requests
  • -c Concurrency count
  • -t Text length (short/medium/long)
  • -s Save generated audio

🤝 Contributing

We welcome all forms of contributions! You can participate by:

  • Submitting Issues to report problems
  • Creating Pull Requests to improve code
  • Sharing usage experiences and suggestions

📜 Project licensed under MIT License

📈 Project Activity

Star History Chart

About

TTSFM is a reverse-engineered API server that mirrors OpenAI's TTS service, providing a compatible interface for text-to-speech conversion with multiple voice options.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 34.6%
  • Python 34.4%
  • CSS 20.5%
  • JavaScript 9.8%
  • Dockerfile 0.7%
0