Amphion tts(Text to Speech) 语音合成

14 篇文章 2 订阅
10 篇文章 0 订阅

强烈推荐使用带 GPU 的 Ubuntu 或 Centos 系统运行,可以租一个比较便宜的机器实例运行,如AutoDL

有了机器我们就可以按步骤操作了

step1 模型下载

git clone https://github.com/open-mmlab/Amphion.git
cd Amphion

step2 下载训练好的模型文件
huggingface下载地址 amphion/valle_libritts
可能下载比较慢,或者无法连接

可以使用镜像地址下载,一个文件一个文件下
https://hf-mirror.com/amphion/valle_libritts/tree/main
在这里插入图片描述

step3 按原目录结构,移动下载的文件

# 当前路径 	./Amphion
mkdir -p ckpts/tts
cd ckpts/tts
mkdir valle_libritts
cd valle_libritts
# 将下载的文件按照原目录结构移动到本文件夹下
mv ...

在这里插入图片描述
step4 搭建执行环境

# 当前路径 	./Amphion
# Install Python Environment
conda create --name amphion python=3.9.15
conda activate amphion # 或source activate amphion

# Install Python Packages Dependencies
sh env.sh

step5 生成语音
参数最后音频文件下载地址 https://keithito.com/LJ-Speech-Dataset/

# 当前路径 	./Amphion
sh egs/tts/VALLE/run.sh --stage 3 --gpu "0" \
--config "ckpts/tts/valle_libritts/args.json" \
--infer_expt_dir ckpts/tts/valle_libritts \
--infer_output_dir ckpts/tts/valle_libritts/result \
--infer_mode "single" \
--infer_text "This is a clip of generated speech with the given text from Amphion Vall-E model." \
--infer_text_prompt "many animals of even complex structure which live parasitically within others are wholly devoid of an alimentary cavity" \
--infer_audio_prompt ckpts/tts/valle_libritts/prompt/LJ025-0076.wav 

参数解释:
在这里插入图片描述
step6 结果检查
在这里插入图片描述

备注:
备注1 Ubuntu 遇到的一些问题及解决方案
1 RuntimeError: espeak not installed on your system

sudo apt update
sudo apt install espeak

备注2 mac 中遇到的一些问题 ,不推荐使用mac ,各种不兼容,最后自己用mac还是没有调成功
1 [Error] Please specify the running stage
解决方案:

# 终端分别执行
brew reinstall gnu-getopt
echo 'export PATH="/opt/homebrew/opt/gnu-getopt/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

2 RuntimeError: Placeholder storage has not been allocated on MPS device!

参考:
https://github.com/open-mmlab/Amphion/tree/main/egs/tts/VALLE
https://huggingface.co/amphion/valle_libritts
https://hf-mirror.com/amphion/valle_libritts/tree/main
https://keithito.com/LJ-Speech-Dataset/

  • 10
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值