8000 GitHub - YuChenSSR/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
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

YuChenSSR/ttsfm

 
 

Repository files navigation

TTSFM

Docker Image License

Disclaimer: This project is for learning and testing purposes only. For production use, please use the official OpenAI TTS service at https://platform.openai.com/docs/guides/audio

English | 中文

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.

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • OR Docker

Installation

Option 1: Using Docker (Recommended)

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

Note: For Apple macOS, if port 7000 is occupied by the Control Center, you can use an alternative local port like 5051:
For Intel chips:

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

For Apple Silicon (M-series) chips, in the repository's current directory:

docker build -t ttsfm .
docker run -p 5051:7000 ttsfm

For Mac, access the web interface at http://localhost:5051.

Option 2: Manual Installation

  1. Clone the repository:
git clone https://github.com/yourusername/ttsfm.git
cd ttsfm
  1. Install dependencies:
pip install -r requirements.txt

Usage

Option 1: Using Docker

  1. The server will start automatically after running the docker command
  2. Access the web interface at http://localhost:7000

Option 2: Manual Usage

  1. Start the server:
python server.py
  1. Access the web interface at http://localhost:7000

  2. Use the API endpoint

API Endpoints

Please refer to the deployed webpage for detailed information.

  • POST /v1/audio/speech: Convert text to speech
  • GET /v1/voices: List available voices

Pressure Testing

The project includes a pressure test script to evaluate server performance under load. To use it:

# Basic test (10 requests, 2 concurrent connections)
python pressure_test.py

# Test with more requests and higher concurrency
python pressure_test.py -n 50 -c 10

# Test with different text lengths
python pressure_test.py -t short  # Short text
python pressure_test.py -t medium # Medium text (default)
python pressure_test.py -t long   # Long text

# Save generated audio files
python pressure_test.py -s

# Custom server URL
python pressure_test.py -u http://localhost:7000

Options:

  • -n, --num-requests: Total number of requests to send (default: 10)
  • -c, --concurrency: Number of concurrent connections (default: 2)
  • -t, --text-length: Length of text to use (short/medium/long)
  • -s, --save-audio: Save generated audio files to test_output directory
  • -u, --url: Custom server URL (default: http://localhost:7000)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Star History

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 35.0%
  • Python 32.9%
  • CSS 21.5%
  • JavaScript 10.1%
  • Dockerfile 0.5%
0