sayit
v1.6
Sayit是宣扬书面文本的跨平台命令行工具。您可以使用它来创建文本文件的录音或用外语改善发音。
Sayit使用Azure认知服务作为后端来保证最佳音频质量,因此它需要对Azure进行订阅,您可以在此处免费获得。截至2021年,Azure认知服务的免费层次包括每月5个文本到语音小时,通常足以个人使用。
您可以在发布部分下载Sayit。 Sayit当前是作为独立的.NET可执行文件分发的(这意味着您不需要安装.NET运行时使用它)和依赖框架的.NET可执行文件。
首次使用时,您需要运行设置向导( ./sayit --setup )并输入Azure认知服务资源的配置参数,例如订阅密钥(您可以在Azure Portal中找到)和区域标识符(请参见此处)。 Sayit将这些参数存储在当前用户的配置文件夹中(例如~/.config/ in Linux)作为应用程序设置XML文件。
$ ./sayit --help
USAGE: sayit [--help] [--version] [--setup] [--list-voices] [--list-formats]
[--voice <voice>] [--format <format>] [--output <output>] [<input>]
INPUT:
<input> the text to be pronounced
(if missing, sayit will try to read it from stdin)
OPTIONS:
--version print sayit version
--setup setup the configuration file
--list-voices, -lv list the available voice shorthands
with their corresponding voice ids
--list-formats, -lf list the available output format shorthands
with their corresponding output format ids
--voice, -v <voice> the voice shorthand
--format, -f <format> the audio output format shorthand
--output, -o <output> the path of the output file
--help display this list of options.
Sayit支持这些设置:
audio-16khz-32kbitrate-mono-mp3 , audio-16khz-64kbitrate-mono-mp3 , audio-16khz-128kbitrate-mono-mp3 , audio-24khz-96kbitrate-mono-mp3 , audio-24khz-160kbitrate-mono-mp3 , audio-24khz-48kbitrate-mono-mp3 , riff-8khz-16bit-mono-pcm , riff-16khz-16bit-mono-pcm , riff-24khz-16bit-mono-pcm 。NB:根据其区域,您的Azure认知服务资源可能不支持某些语言和输出格式(请参阅此处)。
NB:支持声音和格式的选择是随机的。当然,我欢迎建议和贡献。