文字转声音 配音

目录

​文本转声音PaddleSpeech:

python版安装:

麒麟系统报错:

blinker解决方法:

游戏音色库

ttson效果很好 海豚配音

ttsmaker效果也不错

网站参考:

pyttsx3

变换声音


​文本转声音PaddleSpeech:


PaddleSpeech/demos/text_to_speech at develop · PaddlePaddle/PaddleSpeech · GitHub

paddlespeech 只支持linux系统
AI语音模型PaddleSpeech踩坑(安装)指南_安装paddlegan和paddlespeech依赖-CSDN博客

python版安装:

​pip3 install pytest-runner
pip3 install paddleaudio==1.0.1
pip3 install paddlespeech==1.0.1

麒麟系统报错:

libhdf5.so: cannot open shared object file: No such file or directory
 

sudo apt update

sudo apt install libhdf5-dev

export LD_LIBRARY_PATH=/usr/local/hdf5/lib:$LD_LIBRARY_PATH

pip3 uninstall h5py
pip3 install h5py

ERROR: Cannot uninstall 'blinker'. It is a distutils installed project and thus we cannot accurately determine which fi                                                   les belong to it which would lead to only a partial uninstall.

blinker解决方法:

sudo apt-get remove blinker
sudo -H pip install --ignore-installed -U blinker
感谢博主:python3.6 pip install mitmproxy报错Cannot uninstall 'blinker'. It is a distutils installed project..._error: cannot uninstall 'blinker'. it is a distuti-CSDN博客

numpy报错:module 'numpy' has no attribute 'complex'.

解决方法:

pip3 install numpy==1.22

安装paddle:

pip3 install paddlepaddle==2.6.0

报错: No module named 'paddle.fluid'

网上解决方法:换用低版本的paddle。

No module named ‘paddle.fluid‘解决方案_no module named 'paddle.fluid-CSDN博客

麒麟系统没有安装成功

游戏音色库

盘点下游戏音乐作曲家用的音色库 - 哔哩哔哩

蓝奏

https://wwrf.lanzout.com/b0137zdvg 

密码:1fkn

----------有两个音色库太大,蓝奏放不下

度盘

https://pan.baidu.com/s/1u2qzShr7XfmL9UIzdjKkjg

密码4t9k

作者:千彻 https://www.bilibili.com/read/cv25505832/ 出处:bilibili

ttson效果很好 海豚配音

https://www.ttson.cn/

ttsmaker效果也不错

在线免费文字转语音 - TTSMaker官网 | 马克配音

支持pc版下载:

每次需要验证码

TTSMaker桌面版

网站参考:

分享 6 款文本转语音工具:带情感,非常逼真! - 知乎

高水平的人工智能配音软件有哪些? - 知乎

pyttsx3

效果有点生硬

支持:文字转语音库,支持英文,中文,可以调节语速、语调等。

快速入门

## 安装 pip install pyttsx3
import pyttsx3
engine=pyttsx3.init() # 初始化
engine.say('hello word')# 设置读取内容
engine.say('轻轻的我走了,正如我轻轻的来')
# with open('./ku.txt','r',encoding='utf-8')as rf:
#     engine.say(rf.read())
engine.runAndWait() # 执行朗诵

调节语速

-是变慢,+是变快

## 安装 pip install pyttsx3
import pyttsx3

msg = '''大江东去,浪淘尽,千古风流人物。故垒西边,人道是:三国周郎赤壁。乱石穿空,惊涛拍岸,卷起千层雪。江山如画,一时多少豪杰。
遥想公瑾当年,小乔初嫁了,雄姿英发。羽扇纶巾,谈笑间,樯橹灰飞烟灭。故国神游,多情应笑我,早生华发。人生初梦,一尊还酹江月'''
teacher = pyttsx3.init()
rate = teacher.getProperty('rate')
teacher.setProperty('rate', rate - 10)
teacher.say(msg)
teacher.runAndWait()

变换声音

注意只能变换英文,读取中文是不能变的;

import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty('voices')
for voice in voices:
    print(voice, voice.id)
    engine.setProperty('voice', voice.id)
    engine.say("开心")
    engine.runAndWait()
    engine.stop()

生成文件mp3文件

# Import the required module
import pyttsx3

# Create a string
string = "Lorem Ipsum is simply dummy text " \
    + "of the printing and typesetting industry."

# Initialize the Pyttsx3 engine
engine = pyttsx3.init()

# We can use file extension as mp3 and wav, both will work
engine.save_to_file(string, 'speech.mp3')

# Wait until above command is not finished.
engine.runAndWait()


 

  • 6
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AI算法网奇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值