Exporting PDF as MP3?
Kelly L. Fulks
kfulks at knology.net
Sun Mar 23 12:35:11 UTC 2008
Derek Broughton wrote:
> Dotan Cohen wrote:
>> On 23/03/2008, Jonas Norlander <jonorland at gmail.com> wrote:
>>> 2008/3/22, Dotan Cohen <dotancohen at gmail.com>:
>>>> In KPDF one can have the text spoken out loud. Is it possible to make
>>> > an MP3 recording of that? I'm thinking along the lines of a command
>>> > to run in Konsole that would take a PDF file as an argument and
>>> > output a MP3, but I don't know where to start.
>>> I don't know a way to do it from pdf to sound but you could pipe through
>>> pdftotext and use text2wave from Festival to record it with lame like
>>> this: pdftotext somefile.pdf - | text2wave | lame - somefile.mp3
>>> Looks like it works ok.
>> Thank you. The text2wave and lame functions were what I was missing. I
>> was trying to use festival, but the only relevant part of it's manpage
>> was this sentance:
>> More than you can imagine."
> LOL. I remember that from my experimentation with festival. Sometimes too
> much honesty is a bad thing :-)
> It's amazing how simple it turned out to be, though. This is a hugely
> complex task, and it can be done in one short line of script!
Ah, the simplicity of Unix and Unix-like operating systems. Give me a
program that does one thing and does it well. As long as it uses stdin
and stdout it can be chained together with other programs that do one
thing, and together they can do many things. If you want to see this in
pure elegance (IMHO), look at the Mh and XMh email systems (from days of
Kelly L. Fulks
near Huntsville, AL
More information about the kubuntu-users