Skip to content

Commit

Permalink
Update openai-edge-tts-integration.md
Browse files Browse the repository at this point in the history
  • Loading branch information
travisvn authored Oct 20, 2024
1 parent 3f88c7e commit df446fa
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions docs/tutorials/integrations/openai-edge-tts-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 18
title: "Edge TTS"
---

# Integrating `openai-edge-tts` with Open WebUI
# Integrating `openai-edge-tts` 🗣️ with Open WebUI

## What is `openai-edge-tts`, and how is it different from `openedai-speech`?

Expand All @@ -13,15 +13,15 @@ Similar to [openedai-speech](https://github.com/matatonic/openedai-speech), [ope

`openai-edge-tts` is a simpler option that uses a Python package called `edge-tts` to generate the audio.

`edge-tts` leverages the Edge browser's free "Read Aloud" feature to emulate a request to Microsoft / Azure in order to receive very high quality text-to-speech for free.
`edge-tts` ([repo](https://github.com/rany2/edge-tts)) leverages the Edge browser's free "Read Aloud" feature to emulate a request to Microsoft / Azure in order to receive very high quality text-to-speech for free.

## Requirements

- Docker installed on your system
- Open WebUI running
- ffmpeg installed (required for audio format conversion and playback speed adjustments)

## Quick start
## ⚡️ Quick start

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

Expand All @@ -47,9 +47,15 @@ The default API key is the string `your_api_key_here`. You do not have to change

See the [Usage](#usage) section for request examples.

# Please ⭐️ star the repo on GitHub if you find [OpenAI Edge TTS](https://github.com/travisvn/openai-edge-tts) useful

:::tip
You can define the environment variables directly in the `docker run` command. See [Quick Config for Docker](#-quick-config-for-docker) below.
:::

## Alternative Options

### Running with Python
### 🐍 Running with Python

If you prefer to run this project directly with Python, follow these steps to set up a virtual environment, install dependencies, and start the server.

Expand Down Expand Up @@ -176,10 +182,25 @@ curl -X POST http://localhost:5050/v1/audio/speech \

##### Additional Endpoints

- **GET /v1/models**: Lists available TTS models.
- **GET /v1/voices**: Lists `edge-tts` voices for a given language / locale.
- **GET /v1/voices/all**: Lists all `edge-tts` voices, with language support information.
- **POST/GET /v1/models**: Lists available TTS models.
- **POST/GET /v1/voices**: Lists `edge-tts` voices for a given language / locale.
- **POST/GET /v1/voices/all**: Lists all `edge-tts` voices, with language support information.

## 🐳 Quick Config for Docker

You can configure the environment variables in the command used to run the project

```bash
docker run -d -p 5050:5050 \
-e API_KEY=your_api_key_here \
-e PORT=5050 \
-e DEFAULT_VOICE=en-US-AndrewNeural \
-e DEFAULT_RESPONSE_FORMAT=mp3 \
-e DEFAULT_SPEED=1.0 \
-e DEFAULT_LANGUAGE=en-US \
-e REQUIRE_API_KEY=True \
travisvn/openai-edge-tts:latest
```

## Additional Resources

Expand Down

0 comments on commit df446fa

Please sign in to comment.