My wife wants me to come up with a Linux script or program that can convert a PDF file into an audio MP3 that she can study while in her car or while working out.
Anyone got a Perl, Bash, or other script that can do this?
My wife wants me to come up with a Linux script or program that can convert a PDF file into an audio MP3 that she can study while in her car or while working out.
Anyone got a Perl, Bash, or other script that can do this?
festival or gspeaker
hi, had the same problem, in the attachement is the file called pdf2mp3.py which does the conversion of a pdf or text/ascii file into a mp3 audio file.
i wanted to hear work-related publications while making sport during lunch brake. as there's only lot's of stupid commercial stuff in the web, i just wrote my own python-script/program that converts a pdf-file (or ascii/text-file) into an mp3 file. it should be very easy to make it work on a running ubuntu distribution
or other linux system, you just need to install the following packages:
then you have to use the attached file called pdf2mp3.py and make it an executable via:Code:sudo apt-get install python poppler-utils festival festvox-rablpc16k lame
and to be able to run that little program 'system-wide':Code:chmod +x pdf2mp3.py
then you only have to call the script in your shell via:Code:sudo cp pdf2mp3.py /usr/bin/
or via:Code:pdf2mp3.py yourfilename.pdf
or via:Code:pdf2mp3.py yourfilename.txt
and an mp3 is being created!Code:pdf2mp3.py yourfilename.dat
PS: it is the english voice now. other voices can be downloaded here: http://cslu.cse.ogi.edu/tts/download/
Last edited by rennau80; January 8th, 2010 at 03:21 PM.
i am having a problem........
it says.....
chmod: cannot access `pdf2mp3.py': No such file or directory
please advise..........
on following commands terminal shows...............
nahar@nahar-desktop:~$ sudo apt-get install python poppler-utils festival festvox-rablpc16k lame (command 1)
[sudo] password for nahar:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python is already the newest version.
poppler-utils is already the newest version.
festival is already the newest version.
festvox-rablpc16k is already the newest version.
lame is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-2.6.31-14 libnss3-dev libfltk1.1 libnspr4-dev
linux-headers-2.6.31-14-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nahar@nahar-desktop:~$ chmod +x pdf2mp3.py (command 2)problem starts here
chmod: cannot access `pdf2mp3.py': No such file or directory
nahar@nahar-desktop:~$
Last edited by aiiaalla; January 9th, 2010 at 11:19 AM.
seems that you downloaded the file pdf2mp3.py to a different folder. if you do a
it should list the file (i think that for your case it is simply not in your path). otherwise you need to know to which directory you've downloaded the file and do the chmod-command there.Code:ls pdf2mp3.py
nahar@nahar-desktop:~$ ls pdf2mp3.py
ls: cannot access pdf2mp3.py: No such file or directory
nahar@nahar-desktop:~$
the file is on the desktop........
then you have to go to the desktop first via:
should work. then do the chmod.Code:cd Desktop
The file needs to be executable, even if it is in your current directory.
Intel Core i7-2600K | Corsair Hydro H80 Cooler | ASUS P8Z68-V board | Corsair Obsidian 650 case | CORSAIR Pro HX650 | CORSAIR Vengeance 8GB DDR3-1866 | GIGABYTE Radeon HD 6870 1GB | Intel 510 120GB SSD | WD Green 640GB | Dell Ultrasharp U2713HM LED
Hey it worked.
Thanks a lot
how do I get a different voice?
Last edited by aiiaalla; January 11th, 2010 at 02:43 PM.
i downloaded 3 voice packages off the link supplied ....
how do i install them?
Bookmarks