Pages

Thursday, December 08, 2005

News"Reading" in Linux using festival

Our discussion about how TTS on my mobile phone was a good app compared to the Festival thing in Linux, end up being fruitful. Paresh told me that Festival has matured a lot. My previous experience with Festival was of a being a bad program requiring to much of configuration by user. I was wrong.

Festival 1.4.2 version is the one I am talking about, which comes preinstalled in Fedora Core 3. To listen to some file you can simply use the command
festival --tts file.txt
Some computer generated voice will read the file for you. Not knowing how to use system commands through firefox I came up with better idea. Using KDE/Klipper technology.

What is Klipper: Basically klipper is a enhanced copy/paste buffer provided by KDE. You can program it do certain actions when certain kind of text is selected by mouse. For e.g when you select a email address you will be shown a small context menu kinda thing showing option to send email etc. So here is what I did. (Do explore Klipper for knowing more about it)

1) In klipper I added a new action.
2) The regular expression setting is quite trivial, I simply used \b[\w]+\b etc
3) Note that I have the autopopup disable and have setting up some manual invocation command for klipper actions, ( I have set up Alt+R)
4) Now in the command section I wrote this command
echo %s > ~/temp.txt ; festival -tts ~/temp.txt
Which does obvious stuff.

3 comments:

  1. TThe command is excellent.Your idea of using it with klipper is also great... though I didn't understand completely where I should make the changes like the files and etc.

    ReplyDelete
  2. There is no specific option to do something with files in klipper. You can only use the command option to whatever you want using pipes. To set it
    Right-Click Klipper-> Configure Klipper -> Actions tab -> Add Action button -> Click the latest added action to set the regex and then you can add what do on it by rightclicking the action. I am adding a screenshot in the post.

    ReplyDelete
  3. My name is Sara Johnson, I live in california U.S.A and i am a happy woman today? I told my self that any Loan lender that could change my Life and that of my family after been scammed severally by these online loan lenders, i will refer any person that is looking for loan to Them. he gave happiness to me and my family, although at first i found it hard to trust him because of my experiences with past loan lenders, i was in need of a loan of $300,000.00 to start my life all over as a single parents with 2 kids, I met this honest and GOD fearing loan lender online Dr. Dave Logan that helped me with a loan of $300,000.00 U.S. Dollars, he is indeed a GOD fearing man, working with a reputable loan company. If you are in need of loan and you are 100% sure to pay back the loan please contact him on (daveloganloanfirm@gmail.com and Call/Text: +1(501)800-0690 ) .. and inform them Sara Johnson directed you.. Thanks. Blessed Be.

    ReplyDelete