Home/LLM Frameworks/openai-edge-tts
openai-edge-tts logo

openai-edge-tts

Enrichment pending
travisvn/openai-edge-tts

Free, high-quality text-to-speech API endpoint to replace OpenAI, Azure, or ElevenLabs

GraphCanon updated today · GitHub synced today

2.0k
Stars
301
Forks
11
Open issues
13
Watchers
1y
Last push
Python GPL-3.0Created Oct 9, 2024

Trust & integrity

Full report
Maintenance
Dormant (374d since push)
As of today · Source: github_public_v1
Provenance
Not a fork · Personal account
As of today · Source: github_public_v1
Security (OSV)
No criticals
As of today · Source: osv@v1

Public GitHub metadata and optional OSV dependency scans. Signals, not a guarantee. Trust methodology.

Overview

Free, high-quality text-to-speech API endpoint to replace OpenAI, Azure, or ElevenLabs

Capability facts

Deploy
Self-host

Source: dockerfile:Dockerfile · Jul 11, 2026

Docker
Dockerfile present

Source: dockerfile:Dockerfile · Jul 11, 2026

Languages
python

Source: github.language · Jul 11, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Python runtimePython

Source: README excerpt (regex_v1, Jul 11, 2026)

pip install -r requirements.txt
Source link

Tags

README

⚡️ Quick start

The simplest way to get started without having to configure anything is to run the command below

docker run -d -p 5050:5050 travisvn/openai-edge-tts:latest

This will run the service at port 5050 with all the default configs

(Docker required, obviously)


Installation

  1. Clone the Repository:
git clone https://github.com/travisvn/openai-edge-tts.git
cd openai-edge-tts
  1. Environment Variables: Create a .env file in the root directory with the following variables:
API_KEY=your_api_key_here
PORT=5050

DEFAULT_VOICE=en-US-AvaNeural
DEFAULT_RESPONSE_FORMAT=mp3
DEFAULT_SPEED=1.0

DEFAULT_LANGUAGE=en-US

REQUIRE_API_KEY=True
REMOVE_FILTER=False
EXPAND_API=True
DETAILED_ERROR_LOGGING=True

Or, copy the default .env.example with the following:

cp .env.example .env
  1. Run with Docker Compose (recommended):
docker compose up --build

Run with -d to run docker compose in "detached mode", meaning it will run in the background and free up your terminal.

docker compose up -d

Building Locally with FFmpeg using Docker Compose

By default, docker compose up --build creates a minimal image without ffmpeg. If you're building locally (after cloning this repository) and need ffmpeg for audio format conversions (beyond MP3), you can include it in the build.

This is controlled by the INSTALL_FFMPEG_ARG build argument. Set this environment variable to true in one of these ways:

  1. Prefixing the command:
    INSTALL_FFMPEG_ARG=true docker compose up --build
    
  2. Adding to your .env file: Add this line to the .env file in the project root:
    INSTALL_FFMPEG_ARG=true
    
    Then, run docker compose up --build.
  3. Exporting in your shell environment: Add export INSTALL_FFMPEG_ARG=true to your shell configuration (e.g., ~/.zshrc, ~/.bashrc) and reload your shell. Then docker compose up --build will use it.

This is for local builds. For pre-built Docker Hub images, add the latest-ffmpeg tag to the version

docker run -d -p 5050:5050 -e API_KEY=your_api_key_here -e PORT=5050 travisvn/openai-edge-tts:latest-ffmpeg

Alternatively, run directly with Docker:

docker build -t openai-edge-tts .
docker run -p 5050:5050 --env-file .env openai-edge-tts

To run the container in the background, add -d after the docker run command:

docker run -d -p 5050:5050 --env-file .env openai-edge-tts
  1. Access the API: Your server will be accessible at http://localhost:5050.

3. Install Dependencies

Use pip to install the required packages listed in requirements.txt:

pip install -r requirements.txt

License

This project is licensed under GNU General Public License v3.0 (GPL-3.0), and the acceptable use-case is intended to be personal use. For enterprise or non-personal use of openai-edge-tts, contact me at tts@travisvn.com