MAC的“说"命令到 MP3 [英] MAC's "say" command to MP3

查看:23
本文介绍了MAC的“说"命令到 MP3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用 SAY mac 的命令 (say -f file.txt) 读取很长的文本,并将输出记录到 file.mp3.本来想用ffmpeg把所有的都记录下来,但是接下来就需要等所有的读取过程完成了..

I want to read a very long text with the SAY mac's command (say -f file.txt), and to record the output to file.mp3. I thought about using ffmpeg to record all of it, but then i'll need to wait for all the reading process to complete..

我真的不需要听它,所以如果有一种方法可以通过按回车键直接获得 mp3 文件,那就太好了..

I don't really need to listen to it, so if there is a way to directly have an mp3 file just by hitting enter, it would be great..

还有这个项目 txt2mp3mac 但我不能在 shell 脚本中使用它..

There is also this project txt2mp3mac but i can't use it in a shell script..

谢谢..

推荐答案

我现在不在 Mac 上,所以我无法测试,但是 这个页面建议你可以做

I'm not on a Mac right now, so I can't test, but this page suggests you can do

say -f script.txt -o greetings.aiff

script.txt加载应该说的内容并将音频输出保存为greetings.aiff.然后,您可以使用 lame

to load what should be said from script.txt and save the audio output as greetings.aiff. You can then convert it to mp3 using lame with

lame -m m greetings.aiff greetings.mp3

一定要尝试不同的声音.:D

这篇关于MAC的“说"命令到 MP3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆