# Repository Briefing: netease-youdao/EmotiVoice
> Source: https://repoforai.com/repo/netease-youdao/EmotiVoice (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/netease-youdao/EmotiVoice
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: B (58/100 · Maintenance 12/35 · Adoption 20/25 · Releases 6/20 · License 20/20)
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, GPU, API, CLI
- **Momentum**: 8,544 ★ total (+0 24h / +0 7d) · 761 forks
- **Topics**: `ai`, `deep-learning`, `emotion`, `emotivoice`, `multi-speaker`, `prompt`, `python`, `pytorch`, `speech`, `speech-synthesis`, `style`, `text-to-speech`
- **When to Use**: Best for: Teams producing Chinese and English narration, training content, or audio assets in batches, with control over speaker, delivery style, and where inference runs. Skip if: You need a managed service, a verified real-time streaming latency target, or a CPU-only rollout without first validating the runtime and performance.

## Overview
```text
### Architecture & Core Mechanics
EmotiVoice is a Python/PyTorch TTS stack built on PromptTTS. In the batch path, `frontend.py` turns text into phoneme input; `frontend_cn.py` and `frontend_en.py` provide language-specific processing backed by `jieba`, `pypinyin`, and `g2p_en`. `inference_am_vocoder_joint.py` takes the prepared input, a configuration directory, and a checkpoint, then runs the joint acoustic-model and vocoder path to produce audio. Speaker selection and style prompts are separate synthesis controls.

The install stack includes `torch`, `torchaudio`, `transformers`, and `soundfile`. Model preparation calls for `simbert-base-chinese` and the separate synthesis checkpoints. The same project exposes a Streamlit UI through `demo_page.py`, a file-based batch CLI, and an OpenAI-compatible TTS endpoint through the FastAPI app in `openaiapi.py`. These are distinct integration surfaces; the Zhiyun HTTP API is a separately hosted option.

### Key Capabilities & Differentiators
The built-in catalog has more than 2,000 voices. English and Chinese synthesis can be combined in the same input, with digit handling added alongside mixed-language support in v0.2. Voice selection determines who speaks; a text prompt controls delivery, with happy, excited, sad, and angry among the available styles. For evaluation, listen to the same script across several speaker and prompt combinations rather than treating catalog size as a measure of consistency.

The batch path uses a phoneme-preprocessing step before synthesis and writes the results to `outputs/prompt_tts_open_source_joint/test_audio` in the supplied example. The OpenAI-compatible TTS endpoint adds speed adjustment for API clients. Personal-data voice cloning is a separate training workflow with DataBaker and LJSpeech recipes, not a feature to assume is available as a single API request. No streaming protocol or first-audio latency is specified, so HTTP compatibility alone does not establish suitability for real-time dialogue.

### Trade-offs & Limitations
Compared with a managed service such as ElevenLabs, EmotiVoice gives teams control over where inference runs and supports local batch processing without routing every request through a hosted provider. In exchange, the team owns model downloads, dependency compatibility, GPU capacity, service exposure, and upgrades. The OpenAI-compatible interface is a useful starting point for clients that expect it, not a promise of full client compatibility: verify request fields, supported responses, speed behavior, and any streaming requirements before switching.

There are no published latency, throughput, or VRAM figures in the supplied material. Measure cold start, synthesis time, and peak memory for the selected checkpoint, representative input lengths, and target concurrency; do not budget for real-time performance on the strength of the API alone. The repository license is Apache-2.0, but commercial deployment also requires a separate review of checkpoint and voice rights, training-data and recording permissions, and the included user agreement.

### Hardware & Deployment Guide
The source setup uses a Python 3.8 Conda environment, PyTorch and TorchAudio, and an NLTK English tagger resource. Stage both `simbert-base-chinese` and the pretrained `outputs` artifacts before attempting an offline rollout. The packaged Docker path targets NVIDIA GPUs with NVIDIA Container Toolkit. The published `syq163/emoti-voice:latest` image updated on January 4, 2024 exposes Streamlit on `8501` and the OpenAI-compatible API on `8000` when those ports are mapped.

Do not assume a source build behaves identically: the root Dockerfile uses Ubuntu 22.04, pins `torch==1.11.0` and `transformers==4.26.1`, and only starts Streamlit on `8501`. To run the API from source, install the separate API dependencies and run `openaiapi:app` with Uvicorn; the example’s `--reload` flag is for development. Validate TorchAudio and GPU-runtime compatibility with the Torch pin before standardizing on the image. The v0.3 release highlighted both the separate Zhiyun HTTP API and the personal-data cloning workflow.
```

## Key Capabilities
```text
- Text processing: Separate Chinese and English frontends use `jieba`/`pypinyin` and `g2p_en`; v0.2 added mixed-language text and digits.
- Voice and style controls: Select from more than 2,000 listed voices and use text prompts for delivery such as happy, excited, sad, or angry.
- Batch inference: `frontend.py` prepares phoneme input, and `inference_am_vocoder_joint.py` runs the joint acoustic-model and vocoder path.
- Serving interfaces: Streamlit provides the interactive UI, while `openaiapi.py` provides OpenAI-compatible TTS with speed adjustment.
- Deployment distinction: The published image offers ports `8501` and `8000`; the root Dockerfile explicitly starts only Streamlit on `8501`.
- Customization path: Personal-data voice cloning has a separate training workflow with DataBaker and LJSpeech recipes.
```

## Quick Start / Clone
```bash
docker run -dp 127.0.0.1:8501:8501 syq163/emoti-voice:latest
```
