EmotiVoice

netease-youdaoApache-2.0活跃维护

多音色、支持提示词控制情感与风格的语音合成引擎,输入文本即可生成带情绪表现力的自然语音,适合做有声内容和虚拟人配音。

EmotiVoice 😊: a Multi-Voice and Prompt-Controlled TTS Engine

v0.3发布于 2023-12-28 10:27 UTC8,542star +2 / 7 天762fork同步于 2026-11-10 23:32 UTC

怎么上手

由 README 提炼,执行前请确认
docker run -dp 127.0.0.1:8501:8501 syq163/emoti-voice:latest
硬件要求按 README 说明

Docker 方式需要带 NVidia GPU 的机器,并预先配置 NVidia container toolkit(Linux 或 Windows WSL2);README 未说明具体显存要求,也未说明能否纯 CPU 运行。

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源多音色提示控制 TTS 引擎,支持中英双语与情感合成

多音色、支持提示词控制情感与风格的语音合成引擎,输入文本即可生成带情绪表现力的自然语音,适合做有声内容和虚拟人配音。

核心能力

  • 支持中英双语合成,内置 2000+ 种音色
  • 通过提示词控制情感,可生成开心、悲伤、愤怒等语气
  • 提供网页交互界面,也支持脚本批量生成
  • 提供 OpenAI 兼容 TTS API,支持调节语速
  • 支持用个人数据做声音克隆,附 DataBaker 与 LJSpeech 配方

容易踩的坑

除镜像外还需单独下载预训练模型文件(outputs 与 simbert-base-chinese),否则无法推理;完整安装需 Python 3.8 并额外下载 nltk 的 averaged_perceptron_tagger_eng 数据;网页界面默认监听 8501 端口,OpenAI 兼容 API 需另装 fastapi 等依赖并单独启动在 8000 端口。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

2 个版本v0.3
  1. v0.3EmotiVoice 0.3pre-release最新正式版2023-12-28 · 2023-12-28 10:27 UTC

    We are delighted to announce the release of EmotiVoice 0.3 today.

    Update highlights from EmotiVoice 0.3:

    Acknowledgment:

    @bramhooimeijer #55 @lewangdev #60 @ihmily #65 @gokul8747 #83

    One more thing

    We are thrilled to announce the release of the EmotiVoice app for Mac. It is now available for download, allowing you to fully experience all the amazing features that EmotiVoice has to offer! #56

  2. v0.2EmotiVoice 0.2pre-release2023-11-17 · 2023-11-17 08:35 UTC
    查看更新说明

    With valuable feedback and assistance from the community, we are delighted to announce the release of EmotiVoice 0.2 today.

    Update logs from EmotiVoice 0.2:

    • Added support for mixed Chinese and English input text, as well as digits. #28 #8 #23
    • Resolved bugs related to certain modal particles, improving overall robustness. #18
    • Documentation: Introduced the voice wiki page #7
    • Documentation: Included a comprehensive ROADMAP outlining our future plans. #14
    • Updated various elements such as the demo page and user license.
    • Build communication group #1 #40
    • Provide candidate url to download pretrained models #4 #5 #21

    Feel free to update the code and give it a try, or try the Docker image by running the command: docker pull syq163/emoti-voice:0.2

    Acknowledgment: @KimigaiiWuyi #17 @arjun-234 #38 @shirubei #32 and many more……

    We sincerely appreciate all the attention and support. Let's celebrate the remarkable achievement of surpassing 4.2K stars in less than a week! star-history-20231117

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    README: EN | 中文 EmotiVoice 😊: a Multi-Voice and Prompt-Controlled TTS Engine

    EmotiVoice is a powerful and modern open-source text-to-speech engine that is available to you at no cost. EmotiVoice speaks both English and Chinese, and with over 2000 different voices (refer to the List of Voices for details). The most prominent feature is emotional synthesis, allowing you to create speech with a wide range of emotions, including happy, excited, sad, angry and others.

    An easy-to-use web interface is provided. There is also a scripting interface for batch generation of results.

    Here are a few samples that EmotiVoice generates:

    Demo

    A demo is hosted on Replicate, EmotiVoice.

    Hot News

    Features under development

    • Support for more languages, such as Japanese and Korean. #19 #22

    EmotiVoice prioritizes community input and user requests. We welcome your feedback!

    Quickstart

    EmotiVoice Docker image

    The easiest way to try EmotiVoice is by running the docker image. You need a machine with a NVidia GPU. If you have not done so, set up NVidia container toolkit by following the instructions for Linux or Windows WSL2. Then EmotiVoice can be run with,

    docker run -dp 127.0.0.1:8501:8501 syq163/emoti-voice:latest
    

    The Docker image was updated on January 4th, 2024. If you have an older version, please update it by running the following commands:

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

    Now open your browser and navigate to http://localhost:8501 to start using EmotiVoice's powerful TTS capabilities.

    Starting from this version, the 'OpenAI-compatible-TTS API' is now accessible via http://localhost:8000/.

    Full installation

    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"
    

    Prepare model files

    We recommend that users refer to the wiki page How to download the pretrained model files if they encounter any issues.

    git lfs install
    git lfs clone https://huggingface.co/WangZeJun/simbert-base-chinese WangZeJun/simbert-base-chinese
    

    or, you can run:

    git clone https://www.modelscope.cn/syq163/WangZeJun.git
    

    Inference

    1. You can download the pretrained models by simply running the following command:
    git clone https://www.modelscope.cn/syq163/outputs.git
    
    1. The inference text format is <speaker>|<style_prompt/emotion_prompt/content>|<phoneme>|<content>.
    • inference text example: 8051|Happy|<sos/eos> [IH0] [M] [AA1] [T] engsp4 [V] [OY1] [S] engsp4 [AH0] engsp1 [M] [AH1] [L] [T] [IY0] engsp4 [V] [OY1] [S] engsp1 [AE1] [N] [D] engsp1 [P] [R] [AA1] [M] [P] [T] engsp4 [K] [AH0] [N] [T] [R] [OW1] [L] [D] engsp1 [T] [IY1] engsp4 [T] [IY1] engsp4 [EH1] [S] engsp1 [EH1] [N] [JH] [AH0] [N] . <sos/eos>|Emoti-Voice - a Multi-Voice and Prompt-Controlled T-T-S Engine.
    1. You can get phonemes by python frontend.py data/my_text.txt > data/my_text_for_tts.txt.

    2. Then run:

    TEXT=data/inference/text
    python inference_am_vocoder_joint.py \
    --logdir prompt_tts_open_source_joint \
    --config_folder config/joint \
    --checkpoint g_00140000 \
    --test_file $TEXT
    

    the synthesized speech is under outputs/prompt_tts_open_source_joint/test_audio.

    1. Or if you just want to use the interactive TTS demo page, run:
    pip install streamlit
    streamlit run demo_page.py
    

    OpenAI-compatible-TTS API

    Thanks to @lewangdev for adding an OpenAI compatible API #60. To set it up, use the following command:

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

    Wiki page

    You may find more information from our wiki page.

    Training

    Voice Cloning with your personal data has been released on December 13th, 2023.

    Roadmap & Future work

    • Our future plan can be found in the ROADMAP file.
    • The current implementation focuses on emotion/style control by prompts. It uses only pitch, speed, energy, and emotion as style factors, and does not use gender. But it is not complicated to change it to style/timbre control.
    • Suggestions are welcome. You can file issues or @ydopensource on twitter.

    WeChat group

    Welcome to scan the QR code below and join the WeChat group.

    Credits

    License

    EmotiVoice is provided under the Apache-2.0 License - see the LICENSE file for details.

    The interactive page is provided under the User Agreement file.