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 Wed 26 Nov 2014, 21:52
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Flite text to MP3
Moderators: Flash, 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
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Sat 16 Apr 2011, 10:22    Post_subject:  Flite text to MP3
Sub_title: A GUI to convert text to MP3's using flite text to speech
 

I came across flite text to speech in the request thread, and downloaded the files
to see what I could do with them, looks kind of promising, it isn't small somewhere around 14meg
with all the lib file's, the one thing I really like is the talking clock, sounds quite good with
a male Scottish accent, as for the text to speech that's kind of ok, well I can understand it, it comes
with 6 voices that's including the default one, not any way of changing speed that I could find so it's
fairly basic but useable.

It converts to a wav file or reads directly from text, I opted to convert to wav file so that I could store
them for future use, so I have made a small GUI to do that, found the wav files to be to large
so now I've made it so that it converts them to 32bit mp3's, I have tried them at 8bit their still intelligible
and very small, I've still yet to see what else can be done with it so will be a while before I can package it
so in the mean time I'll just post what I've done so far.

Here are the deb files that I used
http://http.us.debian.org/debian/pool/main/f/flite/flite_1.4-release-2_i386.deb
http://http.us.debian.org/debian/pool/main/f/flite/libflite1_1.4-release-2_i386.deb

code for the GUI
EDIT UPDATE V2 for testing:
now have radiobuttons to select voice's and bit-rate
mp3 file naming, now you can type with spaces, it automatically replaces them with "_".
EDIT: cleaned up the script to make it clearer to read

EDIT: V2.1 added save as wav option and mp3 id tags, updated code below.
EDIT: V2.2 see other post for changes
EDIT: V2.3 rewrote to use with gtkdialog4
flitegui2.3.png
 Description   
 Filesize   18.83 KB
 Viewed   916 Time(s)

flitegui2.3.png

flitegui-2.3.tar.gz
Description  Extract and place in /usr/bin
gz

 Download 
Filename  flitegui-2.3.tar.gz 
Filesize  2.29 KB 
Downloaded  363 Time(s) 
theme_Xfce-dusk.png
 Description   
 Filesize   20.58 KB
 Viewed   2439 Time(s)

theme_Xfce-dusk.png

flite_text_recorder_v2.2_.tar.gz
Description  Version 2.2
gz

 Download 
Filename  flite_text_recorder_v2.2_.tar.gz 
Filesize  2.14 KB 
Downloaded  643 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Sat 16 Apr 2011, 13:38    Post_subject:  

Nice work Geoffrey - i packaged it all up into a .pet so people can try it, should have a menu entry in document.

http://smokey01.com/stu90/lucid.puppy.pets/flite-gui_1.4-2.pet

cheers
Back to top
View user's profile Send_private_message 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Sat 16 Apr 2011, 21:59    Post_subject:  

stu90,

thanks for that, I would of got around to doing it but I'm still seeing what else can be done with flite.

Was thinking of adding a input box or buttons for the mp3 bit-rate, that might be useful, also small buttons to select the voice.

32bit seem ok, it reduced the size of a 44meg wav file down to 5.5meg mp3

8 bit was ok too, so I'm thinking maybe buttons for 8, 16, 32 bit would be good for small portable players

Trying to keep it more mouse driven than keyboard

though I have yet to find a way to do that me being a novice at this type of thing.

I'd like to keep it all in the one script if at all possible.

I was thinking of a post-install script in the pet announcing that flite had been installed and where to find the GUI.

Well if you have it may as well use it, I say!

The talking clock is easy enough, just have to place a script in /usr/bin/

just name the script flitetime
Code:
#!/bin/sh
flite_time `date +%H:%M`

to get pschedule to run it on the hour place a file called "root", (I'm guessing that's the username) in /var/spool/cron/crontabs/ with this text
Code:
0 * * * * flitetime # # # #

or either set it with pschedule gui.

Any input from others will be appreciated

Geoffrey
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Sat 16 Apr 2011, 23:08    Post_subject:  

Good stuff Cool

For consideration
help pop up so we know what different voices are, authoring etc

Code:
   <menuitem>
           <label>FAQ</label>
           <action>`Xdialog --wrap --screencenter --left --title "FAQ" --msgbox "this is an example \n put text here \n more lines</action>
         </menuitem>


offer also espeak or other text convertor option - or separate program?
http://www.murga-linux.com/puppy/viewtopic.php?p=508817#508817

keep program open, for multiple file conversion

if unsure of how to program further use programming section of forum

hope that helps

_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Sun 17 Apr 2011, 12:26    Post_subject:  

Lobster,

I've tidied it up a bit, removed the frames to tighten it up, made the voice list selectable,
so now just highlight the voice you want then click on it and drag it to the input box.

It now restarts after a recording and if the media player is selected it restarts after the play is closed, so it seems quite good now,
the mouse does all the work only have to type a name, then that could be cut a pasted.

added a xdialog popup as you suggested, though I still have to give it some content.

There isn't all that much info on the voices, other than male, female, American, Scottish.

I've made a flv of it in action, I'll update the first post when I've done the popup

Geoffrey
flite_gui.flv.tar.gz
Description 
gz

 Download 
Filename  flite_gui.flv.tar.gz 
Filesize  689.02 KB 
Downloaded  611 Time(s) 
flite_gui.png
 Description   
 Filesize   23.55 KB
 Viewed   2717 Time(s)

flite_gui.png

Back to top
View user's profile Send_private_message 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Mon 18 Apr 2011, 10:41    Post_subject:  

Well I've changed it quite a lot, now have radiobuttons to select voice's and bit-rate.

fixed the mp3 file naming, now you can type with spaces, it automatically replaces them with "_".

It's looking good, still haven't added anything to the xdialog popup, uploading it for testing,
to see if anyone can find a bug, I,m calling this one version 2.

I will update the first post with the code , tar.gz and the picture
Back to top
View user's profile Send_private_message 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Wed 20 Apr 2011, 07:42    Post_subject:  

Another update, added save as wav file option and mp3 id tags

see first post.
Back to top
View user's profile Send_private_message 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Mon 25 Apr 2011, 06:35    Post_subject:
Sub_title: version 2.2
 

My next update, V2.2 it's such a pain trying to find a theme that suits as the buttons don't always aline
like I would like them to, so this is the best I can do for the time being.

Anyway so far I've rearranged it slightly, added the ability to listen to the voice's with a sample text,
removed the default voice from the list as it sounds the same as KAL, not the best choice, KAL16 is not
much better, I find AWB the Male Scottish, RMS Male US and SLT Female US the most pleasing,
If I had to pick one it would be RMS, the Male US voice as being the most fluent

also added that when a WAV is recorded it also creates a corresponding txt file in the save dir with the
same information as a mp3 id tag, thought that might be handy, as well as mouse over tool-tip text for the gui.
moved the Quit button away from the record, I kept hitting it by mistake.

As I said when I first started this I'm only a novice, so it may not work as some would expect, I firstly
made it as a one off converter which was supposed to be run when needed but, it does rerun the gui but
doesn't totally close thus leaves a bash script still running which will increment each time until the gui
is quit, I don't know how to get around this, I'm still learning, so any input would be appreciated.

Updating to V2.2, I'm removing the code as it takes up to much room, really no point in having it there.

See first post.

Geoffrey
Back to top
View user's profile Send_private_message 
eztuxer


Joined: 06 Nov 2008
Posts: 483
Location: Belgium

PostPosted: Wed 17 Aug 2011, 16:45    Post_subject:  

Thank you Geoffrey, Stu90, and Lobster.
This is just what I wanted, so I can "read" while driving, or doing the dishes.
I found out I had to place the text file in root directory for it to work.
Probably because the dir it was in had some spaces in it.
This is a great app the voice sounds almost natural.
Is there a sexy airport public announcement female voice that I can patch in ? Cool

_________________
Don't poop it down... Pup it Up ! http://pupitup.org/
Back to top
View user's profile Send_private_message Visit_website 
Egorio

Joined: 31 Aug 2011
Posts: 3

PostPosted: Fri 02 Sep 2011, 06:53    Post_subject:  

Geoffrey, excellent work! are you going to add any new voices?
_________________
Benefits of Using a Mobile Phone Signal Booster
Must read gsm booster guide
Back to top
View user's profile Send_private_message 
gcmartin

Joined: 14 Oct 2005
Posts: 4443
Location: Earth

PostPosted: Sun 11 Sep 2011, 18:24    Post_subject:  

I find this is an interesting addition to Puppy.

Question

Is there a tool somewhere that anyone would recommend for using Puppy in creating your own voice(s) for use with Flite?

Thanks in advance

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send_private_message 
jrb


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

PostPosted: Sat 27 Oct 2012, 12:58    Post_subject:  

Well done Geoffrey.
I've been working with Festival lately with the Nitech voices and noticed that Flite was listed with those same voices. I find the rms voice is listenable. So I checked http://www.wellminded.com/puppy/pupsearch.html and here was your package. Very Nice. Very Happy

I've taken the liberty to update Stu's dotpet with flitegui-2.2:
flite-gui_1.4-2.2.pet

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


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Sun 04 Nov 2012, 10:00    Post_subject:  

jrb wrote:
Well done Geoffrey.
I've been working with Festival lately with the Nitech voices and noticed that Flite was listed with those same voices. I find the rms voice is listenable. So I checked http://www.wellminded.com/puppy/pupsearch.html and here was your package. Very Nice. Very Happy

I've taken the liberty to update Stu's dotpet with flitegui-2.2:
flite-gui_1.4-2.2.pet

Thanks, J


I'd forgot all about it, yeah works ok but I guess the voices can be a little irritating. now I can see how it could be made to look a little better and improve the functionality, though I think it does the job ok as it is. I would of liked more voices but I'm afraid that's it, flite-1.4-release was the last, updated 2009.
I'll see if I can improve it a little.

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE
Back to top
View user's profile Send_private_message 
Master_wrong

Joined: 19 Mar 2008
Posts: 456

PostPosted: Fri 28 Dec 2012, 10:50    Post_subject:  

i have try some trick with sound for email:

for example in claws-mail:
in preference-receiving

click on run command on manual

script :
flite -t "you got %d new mail"
or
flite -voice slt -t "you got %d mail"

then computer will say it when you got mail

thanks

_________________
Cluster-Pup v.2-Puppy Beowulf Cluster
http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199
Back to top
View user's profile Send_private_message 
Geoffrey


Joined: 30 May 2010
Posts: 1477
Location: Queensland Australia ɹǝpu∩uʍop

PostPosted: Thu 24 Jan 2013, 01:07    Post_subject:
Sub_title: flitegui 2.3
 

I've rewrote the flitegui script to use gtkdialog4, it is now a lot tidier and has the ability to save the last used bitrate and voice as default.

Increased the bitrate range from 8, 16, 32 bit to 32, 96, 128 bit

Selecting a voice and pressing listen gives a sample by speaking the current date and year, right mouse click on the listen button stops the action.

see first post.

_________________
Carolina: Recent Repository Additions
Create strikethrough text HERE
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 » Advanced Topics » Puppy Projects
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.0952s ][ Queries: 12 (0.0037s) ][ GZIP on ]