aspeak——基于微软Auzre语音合成的文本转语音命令行工具 Linux

zsxwz 22/05.08 11:15 1598

github:

https://github.com/kxxt/aspeak

 

自己试用了一下,合成中文感觉还可以。支持的人声很多,听起来感觉能接近人声。

安装比较简单:

pip install aspeak

 

命令行参数:

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -L, --list-voices     list available voices, you can combine this argument with -v and -l
  -Q, --list-qualities-and-formats
                        list available qualities and formats
  -t [TEXT], --text [TEXT]
                        Text to speak. Left blank when reading from file/stdin
  -s [SSML], --ssml [SSML]
                        SSML to speak. Left blank when reading from file/stdin
  -f FILE, --file FILE  Text/SSML file to speak, default to `-`(stdin)
  -e ENCODING, --encoding ENCODING
                        Text/SSML file encoding, default to "utf-8"(Not for stdin!)
  -o OUTPUT_PATH, --output OUTPUT_PATH
                        Output file path, wav format by default
  --mp3                 Use mp3 format for output. (Only works when outputting to a file)
  --ogg                 Use ogg format for output. (Only works when outputting to a file)
  --webm                Use webm format for output. (Only works when outputting to a file)
  --wav                 Use wav format for output
  -F FORMAT, --format FORMAT
                        Set output audio format (experts only)
  -l LOCALE, --locale LOCALE
                        Locale to use, default to en-US
  -v VOICE, --voice VOICE
                        Voice to use
  -q QUALITY, --quality QUALITY
                        Output quality, default to 0

Options for --text:
  -p PITCH, --pitch PITCH
                        Set pitch, default to 0
  -r RATE, --rate RATE  Set speech rate, default to 0.04
  -S STYLE, --style STYLE
                        Set speech style, default to "general"

 

简单使用:

#合成
aspeak -t "你好,世界!hello world" -v zh-CN-YunjianNeural

#转换文本
aspeak -f input.txt -l zh-CN -o t.wav

上一篇:微信linux版本升级,可以截图和转发了
下一篇:Kotlin 多平台音乐下载器,支持 Spotify/ Youtube Music等平台
最新回复 (1)
  • 问风 0
    引用 2
    6
    23/09.22 23:58 0 回复
    • 姿势论坛—姿势小王子
      3
返回
发新帖
友情链接
免责声明:本站部分资源来源于网络,如有侵权请发邮件(mail@zsxwz.com)告知我们,我们将会在24小时内处理。