Exporting PDF as MP3?

Derek Broughton news at pointerstop.ca
Sun Mar 23 02:52:22 UTC 2008


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:
> "BUGS
>        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!
-- 
derek





More information about the kubuntu-users mailing list