MacOS语音缓存
mac-speech-cache的Python项目详细描述
安装
$ [sudo] pip install mac-speech-cache
工作原理
~/Library/Caches/speech-cache/<hash>.aiff
脚本使用
~/Library/Caches/speech-cache/<hash>.aiff
脚本使用
command | ^{ |
---|---|
^{ | `usage: speech-cache [-v voice] [-f in |
示例
# say "$@" $ afplay "$(speech-cache "$@")"
缓存多个文件和声音:
$ find . -name "*.txt"| xargs -I{} speech-cache -f {} -v Milena $ find . -name "*.txt"| xargs -I{} speech-cache -f {} -v Yuri