TTS (Text-To-Speech) 命令行工具
- 下载地址: http://www.cross-plus-a.com/bconsole.htm
列出系统中存在的语音
balcon.exe -l
以下输出来自本人的win10家庭版(运行在WSL2环境)
查看语音属性
./balcon.exe -n “Microsoft David Desktop” -m
合成语音
./balcon.exe -n “Microsoft David Desktop” -t “The text will be read slowly.” -s -5 -v 70 (-s 速度 -v 音量)
合成语音并输出到音频文件
./balcon.exe -n “Microsoft David Desktop” -t “The text will be read slowly.” -s -5 -v 70 -w out.wav
由剪贴板获取内容
Get text from the clipboard, apply rules for the pronunciation correction and read aloud:
./balcon.exe -n “Microsoft David Desktop” -c -d “d:\rex\rules.rex” -d “d:\dic\rules.dic”
由标准输入读入,生成音频文件和LRC文件
./balcon.exe -n “Microsoft David Desktop” -w “book.wav” -i -lrc --lrc-length 80 --lrc-title “The Lord of the Rings”
转换字幕文件到音频
./balcon.exe -n “Microsoft David Desktop” -f “Text\film.srt” -w “Sound\film.wav” --sub-fit --sub-max 2
调用lame生成mp3文件
./balcon.exe -n “Microsoft David Desktop” -f d:\book.txt -n Heather -o --raw | lame -r -s 22.05 -m m -h - book.mp3