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

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

问题描述

我想用SAY mac的命令(say -f file.txt)阅读很长的文本,并将输出记录到file.mp3.我考虑过要使用ffmpeg记录所有内容,但随后我需要等待所有读取过程完成..

我真的不需要听它,因此,如果有一种方法可以直接通过按Enter键直接拥有mp3文件,那就太好了.

还有一个项目 txt2mp3mac ,但是我不能在shell脚本中使用它. >

谢谢..

更新

检查此 要点 以获取执行此操作的脚本

解决方案

我现在不在Mac上,因此无法测试,但是 lame

将其转换为mp3.

lame -m m greetings.aiff greetings.mp3

绝对可以尝试不同的声音. :D

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..

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..

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

Thanks..

Update

Check this gist for a script that does it

解决方案

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

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

Definitely try the different voices. :D

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

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