# EmotiVoice

> Multi-voice, prompt-controlled text-to-speech with emotional synthesis

- Category: Multimodal Generation / Audio, Music & Voice
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/netease-youdao/EmotiVoice
- Canonical page: https://ai-tldr.dev/tools/emotivoice/

## In short

EmotiVoice is a free, open-source text-to-speech engine from NetEase Youdao. It speaks both English and Chinese and offers more than 2000 different voices, so you can pick a sound that fits your project. It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in Python and licensed Apache-2.0.

## Overview

EmotiVoice is a free, open-source text-to-speech engine from NetEase Youdao. It speaks both English and Chinese and offers more than 2000 different voices, so you can pick a sound that fits your project.

Its standout feature is emotional synthesis. By writing a short style prompt, you can make the same voice sound happy, excited, sad, angry, or many other moods. EmotiVoice ships with an easy web interface for trying voices and a scripting interface for generating speech in batches.

## What it does

- Over 2000 voices across English and Chinese
- Emotional synthesis controlled by simple text prompts (happy, excited, sad, angry, and more)
- Interactive Streamlit web demo page for quick experiments
- Batch generation through a command-line scripting interface
- An OpenAI-compatible TTS API for easy integration, including voice speed control
- Voice cloning support using your own recorded data

## Getting started

The quickest way to try EmotiVoice is the Docker image, which needs a machine with an NVIDIA GPU. You can also do a full local install with conda for more control.

1. Run the Docker image

   Pull and start the official image, then open the web interface in your browser at http://localhost:8501. The OpenAI-compatible TTS API is available at http://localhost:8000/.

```bash
docker run -dp 127.0.0.1:8501:8501 -p 127.0.0.1:8000:8000 syq163/emoti-voice:latest
```

2. Full installation with conda

   Create a Python 3.8 environment and install the dependencies if you prefer a local setup instead of Docker.

```bash
conda create -n EmotiVoice python=3.8 -y
conda activate EmotiVoice
pip install torch torchaudio
pip install numpy numba scipy transformers soundfile yacs g2p_en jieba pypinyin pypinyin_dict
python -m nltk.downloader "averaged_perceptron_tagger_eng"
```

3. Launch the interactive demo page

   After installing the pretrained models, start the Streamlit demo to try voices and emotions in your browser.

```bash
pip install streamlit
streamlit run demo_page.py
```

4. Start the OpenAI-compatible API

   Install the API dependencies and run the server to call EmotiVoice from any OpenAI-style TTS client.

```bash
pip install fastapi pydub uvicorn[standard] pyrubberband
uvicorn openaiapi:app --reload
```

## When to use it

- Adding expressive, emotion-aware narration to videos, games, or apps
- Generating bilingual English and Chinese voiceovers at scale through batch scripts
- Dropping a self-hosted TTS backend into existing tools via the OpenAI-compatible API
- Cloning a personal voice from your own recordings for custom speech output
