Mac OS X下使用say将文本转成音频

Mac下郎读的命令say,可以将文本转成音频!

1 打开 Terminal.app

2 在命令行中打入

1
say hello world

男声

1
2
3
4
5
$ say -v Agnes "hello world"
$ say -v Kathy "hello world"
$ say -v Princess "hello world"
$ say -v Vicki "hello world"
$ say -v Victoria "hello world"

女声

1
2
3
4
$ say -v Bruce "hello world"
$ say -v Fred "hello world"
$ say -v Junior "hello world"
$ say -v Ralph "hello world"

比较好玩的声音

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ say -v Albert "hello world"
$ say -v "Bad News" "hello world"
$ say -v Bahh "hello world"
$ say -v Bells "hello world"
$ say -v Boing "hello world"
$ say -v Bubbles "hello world"
$ say -v Cellos "hello world"
$ say -v Deranged "hello world"
$ say -v "Good News" "hello world"
$ say -v Hysterical "hello world"
$ say -v "Pipe Organ" "hello world"
$ say -v Trinoids "hello world"
$ say -v Whisper "hello world"
$ say -v Zarvox "hello world"

当然如果你想转成音频文件也是可以的,这样就可以在上班的途中听了!

1
$ say -o readme.m4a -f ~/Documents/readme.txt

这样就可以生成readme.m4a的音频文件了

最后放上二个比较好玩

1
2
3
4
$ say -v cello i can even sing a song sing a song sing a song i like coffeand the pie and working till the night.
 
$ say --voice="Good News" Specify the voice to be used. Default is the voice selected in System Preferences.
 

如何设置支持中文

ref:

http://gabrielserafini.com/blog/2008/08/19/mac-os-x-voices-for-using-with-the-say-command/

http://hints.macworld.com/article.php?story=20110722230755650

原文地址:http://dlj.bz/004rH8

Comments