网易有道强力开源中英双语语音克隆
EmotiVoice是一个强大的开源TTS引擎,支持中英文双语,包含2000多种不同的音色,以及特色的情感合成功能,支持合成包含快乐、兴奋、悲伤、愤怒等广泛情感的语音。
项目地址(基于PromptTTS):
https://github.com/netease-youdao/EmotiVoice
EmotiVoice Docker镜像
尝试EmotiVoice最简单的方法是运行docker镜像。你需要一台带有NVidia GPU的机器。先按照Linux和Windows WSL2平台的说明安装NVidia容器工具包。然后可以直接运行EmotiVoice镜像:
docker run -dp 127.0.0.1:8501:8501 syq163/emoti-voice:latest
现在打开浏览器,导航到 http://localhost:8501 ,就可以体验EmotiVoice强大的TTS功能。
完整安装
conda create -n EmotiVoice python=3.8 -y
conda activate EmotiVoice
pip install torch torchaudio
pip install numpy numba scipy transformers==4.26.1 soundfile yacs g2p_en jieba pypinyin
准备模型文件
git lfs install
git lfs clone https://huggingface.co/WangZeJun/simbert-base-chinese WangZeJun/simbert-base-chinese
推理
1. 下载预训练模型, 然后运行:
mkdir -p outputs/style_encoder/ckpt
mkdir -p outputs/prompt_tts_open_source_joint/ckpt
2. 将
g_*
, do_*
文件放到outputs/ prompt_tts_open_source_joint/ ckpt
将
checkpoint_*
放到outputs/ style_encoder/ ckpt
中3. 推理输入文本格式是:
<speaker>|<style_prompt/emotion_prompt/content>|<phoneme>|<content>
.例如:
Maria_Kasper|非常开心|<sos/eos> uo3 sp1 l ai2 sp0 d ao4 sp1 b ei3 sp0 j ing1 sp3 q ing1 sp0 h ua2 sp0 d a4 sp0 x ve2 <sos/eos>|我来到北京,清华大学
.4. 其中的音素(phonemes)可以这样得到:
python frontend.py data/my_text.txt > data/my_text_for_tts.txt
.5. 然后运行:
TEXT=data/inference/text
pythoninference_am_vocoder_joint.py \
--logdir prompt_tts_open_source_joint \
--config_folder config/joint \
--checkpoint g_00140000 \
--test_file $TEXT
合成的语音结果在:
outputs/prompt_tts_open_source_joint/test_audio
.6. 或者你可以直接使用交互的网页界面:
pipinstall streamlit
streamlitrun demo_page.py
未来工作
当前的实现侧重于通过提示控制情绪/风格。它只使用音高、速度、能量和情感作为风格因素,而不使用性别。但是将其更改为样式、音色控制并不复杂,类似于PromptTTS的原始闭源实现。
许可
EmotiVoice是根据Apache-2.0许可证提供的 - 有关详细信息,请参阅许可证文件。
永久福利 直投简历
简历投递:[email protected]
最新评论
推荐文章
作者最新文章
你可能感兴趣的文章
Copyright Disclaimer: The copyright of contents (including texts, images, videos and audios) posted above belong to the User who shared or the third-party website which the User shared from. If you found your copyright have been infringed, please send a DMCA takedown notice to [email protected]. For more detail of the source, please click on the button "Read Original Post" below. For other communications, please send to [email protected].
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。