Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Oct 2014, 21:45
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How I make audiobooks from text and pdf files
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Fri 02 Apr 2010, 01:11    Post_subject:  How I make audiobooks from text and pdf files
Sub_title: Use freeware to create audiobooks
 

7Nov2011
I have just completely rewritten my text-to-audiobook software. Puppy (all versions) now comes with pdftotext which allows the easy conversion and use of pdf files. As well I have built in the ability to place a "trill" at the beginning of each MP3 file and easily choose the length of the files in seconds. You can also choose to have the file read aloud rather than made into MP3's.

The install is still the same up to the point of installing my file2aud tools. I will leave the old tools in place in case anyone prefers them but you should try out the new ones!




I have long been a fan of audiobooks going back to the days of audio cassettes. Many's the long car trip they have kept me awake through. With the advent of the mp3 player it became possible for me to listen to stories while doing the numerous no thought required tasks of rural life.

Prior to Puppy I used a windows program, TextAloud, to create audiobooks from text files. It did an admirable job with a voice that I could listen to for several hours at a time, reminded me of my whiskey throated uncle. It runs intermittently in wine, crashing frequently and requiring restart.

It became my goal to get a dependable technique going in Puppy using freeware, preferably open source. Sadly I have not been able to find any open source voices that I can listen to for more than a few minutes, but I have found freeware that allows me to use my old favourite, Lernout & Hauspie - Adult Male #2, American English (TruVoice), SAPI4.

In the following HowTo I will explain where to get the software, including voices. How to install it. And I am attaching my txt2audbk-splt-0.3.pet which contains the tools I use to create books.

I have accumulated a collection of primarily science fiction books. They have all been converted to Text files and then zipped. I am including tools to make books from both text files and zipped text files. Also tools to speak text, or any text containing, files direct, make single mp3 files direct, batch convert a folder full of text or zipped text files. Also a SAPI voice chooser allowing you to set the voice you wish these tools to use. Also a tool to replace spaces in file names with underscores, this is important as files with spaces will not convert. Also a tool to copy the folders containing your audio books to your mp3 player so the files are copied in the order they are meant to be played.

Ok, Let's begin the HowTo:

Edited_times_total
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Fri 02 Apr 2010, 01:12    Post_subject:  

1.) You will need to install Wine. You can get the latest version for Puppy from here

2.) Open a console and type "winecfg". This will create the folder /root/.wine where all your windows based programs will go. This is a hidden folder so you will need to enable seeing hidden files and folders, click on the eyeball on the rox toolbar.

3.) Find a windows XP machine and copy wmasf.dll, wmidx.dll, wmvcore.dll from C:\WINDOWS\system32\ to /root/.wine/drive_c/windows/system32. These are needed by the windows sofware you will be running.

4.) Download TextToWavSetup.exe from http://smart-butler.com/download.html#text2wav. There are sample voices lower on the page although some of them are no longer available.

5.) Once downloaded, click on TextToWavSetup.exe to begin the install process. I simply accepted the default settings until I got to where it asked, "Which components should be installed?".

6.) Choose "Download and install Microsoft Speech API 4.0 core

7.) Choose "American English" under Lernout & Hauspie voices or any of the SAPI4 voices

8.) Decline API5.1 (I have not been able to get the SAPI5 software to run)

9.) Decline American English SAPI5

At this point the program will download and install the software. You must be connected to the internet for this to succeed.

You should now be able to go to /root/.wine/drive_c/Program Files/TextToWav/ and click on TextToWav.exe. This will run the TextToWav GUI and you can type in or copy and paste in text and have it spoken or saved to a .wav or .mp3 file. You could make a single file audiobook file right here but I think you will find my toolkit much more suitable.
file2aud-0.03.pet
Description  convert pdf, text, or script files to mp3 or choose audio readout
pet

 Download 
Filename  file2aud-0.03.pet 
Filesize  29.78 KB 
Downloaded  171 Time(s) 
sox-14.3.0-p4-jrb.pet
Description  needed to add "trill" to mp3's. Tested in Wary, Racy, Lucid, Slacko
pet

 Download 
Filename  sox-14.3.0-p4-jrb.pet 
Filesize  302.9 KB 
Downloaded  176 Time(s) 
pdftotext-w5c.pet
Description  needed to use pdf files in wary 512, 514
pet

 Download 
Filename  pdftotext-w5c.pet 
Filesize  7.55 KB 
Downloaded  189 Time(s) 
txt2audbk-0.3.pet
Description  Tools for creating audiobooks with SAPI4 voices
pet

 Download 
Filename  txt2audbk-0.3.pet 
Filesize  249.04 KB 
Downloaded  329 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Fri 02 Apr 2010, 01:12    Post_subject:  

Revised 7Nov2011
Audio Book Tools:
Start by installing file2aud-0.02.pet. This will install a number of tools. I will go through them individually.

1.) SAPIvoice_chooser - This is on the Multimedia menu. Click on it and it will show you a list of all the installed voices. Click on a voice and then on the Listen/Choose button. The GUI will disappear and the voice will speak to you. The GUI will then come back. If you liked the voice click the Done button, otherwise listen to another voice. The last one you listen to will be installed as the default for your system.

2.) rm_space - This is available on the right click menu. Right click on a .txt file and you can replace any spaces in the file name with underscores. Right click on a folder and choose rm_space_within and you can replace any spaces in the files it contains with underscores. Right click on anything else, go to OpenWith and choose rm_space and it will replace spaces with underscores. The new file2aud tools will now deal with spaces in file names but its still a handy tool.

3.) Right click on any .pdf, text containing file, zipped text containing file or a directory containing these kind of files and a small GUI will open up allowing you to choose A.)whether to just read the file aloud B.)how long to make the MP3 files C.)whether to add a 1 second "trill" the beginning of each MP3.

The resulting MP3 files will be placed in folders named after the file(s) all in a folder named file2aud_mp3s.

4.) cp_usbplayer_rxvt - You must create a file on your mp3 player named 00mp3. Once you have done this, if your mp3 player is mounted, you can Right click on a folder and choose cp_usbplayer. If the folder contains .mp3 files that have been created with these audio book tools, the same folder will be created on your mp3 player and the files will be copied sequentially into it. Since some mp3 players can only handle up to 99 files per folder another folder with the same name but with a 2 appended on it will contain files 100-198. Similarly other folders will be created up to a maximum of 495 files per book. (41hrs 15min, War and Peace might be a problem. Let me know and I'll customize for you)

If you right click on a folder containing other folders containing the .mp3 files (after a batch conversion) then each of the book folders will be copied to your mp3 player.

Note: I have tested this successfully in Wary 5.1.2, 5.1.4, 5.2, Racy 5.1.110, Lupu 5.28 and Slacko 5.3. It also worked in Puppy431 with a statically built version of pdftotext

http://www.gutenberg.org/wiki/Main_Page is an excellent source of free ebooks and also http://www.baen.com/library/.

Hope you enjoy the end products of this technique as much as I do. Enjoy, J Very Happy

Edited_times_total
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3382
Location: Oregon

PostPosted: Fri 02 Apr 2010, 01:31    Post_subject:  

How much drive space does this take to install all before using it?
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Fri 02 Apr 2010, 01:53    Post_subject:  

Good question 8-bit,
I just looked at my quirky13 install and it appears to be using about 160MB of the pupsave. Thats with the latest wine-1.1.41-i486.pet and everything contained in the pupsave. I convert all my files in folders on /mnt/'home. My /mnt/home is ext3 so I just tried a quick convert on an ntfs drive and it worked fine.

I also just tried a timed test. A 532 Kb text file, which is fairly typical of full sized novels, took 6min 5sec to convert to an audiobook. Thats on my 5 year old pentium4 3.0GHz machine.
Back to top
View user's profile Send_private_message 
8-bit


Joined: 03 Apr 2007
Posts: 3382
Location: Oregon

PostPosted: Fri 02 Apr 2010, 03:08    Post_subject:  

As a caution, on step 3 to copy Windows dll files for use by the program, I would suggest that anyone that makes a custom Puppy not include this as Microsoft gets really upset if they find some distro is using any of their files!
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Fri 02 Apr 2010, 09:51    Post_subject:  

8-bit wrote:
As a caution, on step 3 to copy Windows dll files for use by the program, I would suggest that anyone that makes a custom Puppy not include this as Microsoft gets really upset if they find some distro is using any of their files!

Agreed, one shouldn't redistribute these files, which is why I have not included them in my .pet. However, if you already have a windowsXP installation on the same machine you are entirely legal. You can even symlink wmasf.dll, wmidx.dll, wmvcore.dll from C:\WINDOWS\system32\ to /root/.wine/drive_c/windows/system32 rather than copying them.

BTW, I just checked a win2k machine and those same files are in c:\WINNT\system32. I don't have access to vista or windows7 but I suspect they are still in \system32 there as well.
Back to top
View user's profile Send_private_message 
ITAmember

Joined: 13 Sep 2009
Posts: 168
Location: The middle of a cornfield

PostPosted: Fri 02 Apr 2010, 10:28    Post_subject:  

The dll files are also in C:\Windows\System32 on Windows 7, that means they should also be included with Vista.
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Sun 04 Apr 2010, 16:23    Post_subject:  

Just a little side note here. My wife, who suffers from smoke induced asthma and bronchitis, has recently been laid low by some slash (brush) burning in our area. Sad When she tries to talk she breaks out in nasty coughing. I installed the TextToWav software on her computer and she is now talking to me with the GUI on the multimedia menu. Actually quite effective. Very Happy
Back to top
View user's profile Send_private_message 
Roy

Joined: 31 Dec 2008
Posts: 442

PostPosted: Sat 10 Apr 2010, 10:28    Post_subject:  

Installing the British voices (male and female) gives
Code:
fixme: jack: JACK_drvLoadto use jack error loading the jack library libjack.so.0, please install this library


I think simply creating a blank file in /usr/lib/ named libjack.so.0 will suffice and allow British voices to work. (I actually did a long string of other -- unnecessary -- things before the British voices functioned, but think this was the basic end result that worked.)

Thank you for this, jrb!

-Roy
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Sat 10 Apr 2010, 13:40    Post_subject:  

Your welcome Roy,

Which version of wine are you using?
Back to top
View user's profile Send_private_message 
linuxsansdisquedur


Joined: 13 Jan 2009
Posts: 250
Location: South of France

PostPosted: Sat 10 Apr 2010, 16:53    Post_subject:  

have you seen http://vozme.com/bookmarklet.php?lang=en
(find in http://www.murga-linux.com/puppy//viewtopic.php?t=49303&sid=e9645876313605f61e43aced19400cdc)

_________________
le max avec le min
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Sat 10 Apr 2010, 23:52    Post_subject:  

linuxsansdisquedur wrote:
have you seen http://vozme.com/bookmarklet.php?lang=en
No I hadn't. The female voice isn't too bad. I'm afraid my internet speed is too slow to send much text at a time.

Thanks, J
Back to top
View user's profile Send_private_message 
Roy

Joined: 31 Dec 2008
Posts: 442

PostPosted: Sun 11 Apr 2010, 00:24    Post_subject:  

I deviated a bit by using wine-1.1.42-i486.pet and the latest beta version of smart butler's text to wav. The American English voices worked after following your instructions (if my memory serves correctly), but the British languages I added did not. So I ran it from the terminal and saw the nag for jack with those voices.

What I had actually done was locate jack-audio-connection-kit-0.109.2.pet in this thread: http://www.murga-linux.com/puppy/viewtopic.php?t=24246&sid=187b260dfe4f7f8c1960190dc63fccda and installed it. Then running the 'ln -s /usr/lib/libjack-0.100.0.so.0 /usr/lib/libjack.so.0' command in console creates a symlink to libjack-100.0.so.0 that is renamed libjack.so.0, right? (I am not an expert on this stuff.)

Everything now works, but a file system search for libjack-0.100.0.so.0 or any shortened variation comes up empty and a quick glance in my /usr/lib/ shows that it is not there. I basically created a blank file symlinked to nowhere with the console command previously mentioned. I don't think the .pet I installed contains jack and was an unnecessary move on my part. The other .pet mentioned by maegerlab on that thread is not available -- maybe it was the one with the jack library.

Having said all that, I have not found a SAPI4 which is as easy to listen to as your choice of Lernout & Hauspie - Adult Male #2, American English (TruVoice). I should also add that I am using a full install of Gray's Boxpup4.31 right now, although I doubt that makes much difference.

-Roy
Back to top
View user's profile Send_private_message 
jrb


Joined: 11 Dec 2007
Posts: 1040
Location: Smithers, BC, Canada

PostPosted: Mon 07 Nov 2011, 20:16    Post_subject: New version of file2aud tools  

I have just posted a completely new set of file to audio tools. See page 1.

Enjoy, J Very Happy
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1134s ][ Queries: 12 (0.0234s) ][ GZIP on ]