Archive for the ‘technical’ Category

using text to speech in firefox

Monday, December 26th, 2005

There are so many nice articles written in web everyday. And after delicious, digg, reddit etc are there, these articles are becoming reachable also. But i dont have time to read all of them. How nice it would be if someone will read them for me while in am working on something else. Here is a simple solution.

Software Requirements -
* festival (text to speech software)
* mbrola (speech synthesizers)

Steps -

1) Install festival
- festival comes by default with my distribution fc4.

2) Test festival
- echo “hello world” | festival –tts
or festival –tts filename.txt

this is a basic setup with which will work. You can save the webpage and then run festival on it.

3) Improve voice quality with mbrola ( follow the instructions at this link )
- Get the binary of your architecture from mbroal download page. i386 people get mbr01h.zip. move the binary of your architecture available in mbr301h.zip to any $PATH directory and rename it to just mbrola. ex : mv mbrola-linux-i386 /usr/local/bin/mbrola
- Get the festival voice wrapper from here and extract it to festival voices directory (aka $FVD) (/usr/share/festival/voices for me)
– move us1_mbrola available in the tar to $FVD/english
– get us1 voice from mbrola voices page. extract the mbrola voice (eg us1) to $FVD/english/us1_mbrola/
— to add more voices just copy festvox to another directory (say us2_mbrola), and do the necessary changes to file names and data. replace every us1 with us2 (for us2 voice). and then copy the new voice like before(us1 case).

run festival as in step 2 and you will be able to listen to any text in a real like voice.

But its not very convenient to everytime save text and then run festival. so a firefox extension will do this job for us. coz i am not a firefox extension hacker i have worked around the problem to solve it for me.. if anyone knows how to save the selected test into a file and then run a system program using a firefox extension then please let me know. or those who are looking around to develop something cool, can write such an extension for firefox.

4) my hack to this problem - i mapped a mouse gesture to a javascript (provided by Optimoz Mouse Gesture extension) that posts the selected test to a cgi file sitting on localhost. this cgi file run festival tts on the text and i am able to listen to selected text with a simple mouse gesture. the javascript follows -

Q=”;
x=parent.content.document;
y=window;
if(x.getSelection){
Q=x.getSelection();
}else if(y.getSelection){
Q=y.getSelection();
}
var r = new XMLHttpRequest();
r.open(”GET”, “http://localhost/~user/cgi-bin/tts.cgi?data=”+escape(Q) );
r.send( null );

write a simple cgi files which just does `echo $_GET[’data’] | festival –tts`

5) festival also provides text2wave which allows you to convert text to wave file and you can enqueue the audio file into your playlist.

* window managers like KDE/Gnome etc provides this facility. so if you use a complex window manager, try to explore this facility in it before going through the above procedure.

long time no links -
* The C++ Source. As Simple As Possible?
* How to Interview a Programmer
* You have the right to blog silent!
* 2006 Will Be Delayed By A Second
* Switched On: The Year of the Switch
* Three Reasons Why You Should be an Entrepreneur
* timbl’s blog
* Software Predicts Movie Success
* Agatra / Forget your passwords

Is bloglines crappy ?

Tuesday, August 9th, 2005

I got a mail from a polular technical forum

Dear *** User,

It has been observed (from our logs) that your account makes an unreasonable number of fetches from the arstechnica website. Perhaps you are using bloglines, which btw is very very inefficient at managing blog posts. We recommend you to bring down the fetches from our site, or we’ll have to deny access to your IP.

Regards

Admin
***

and in response to my reply [where i stated that ‘my IP’ servers as a proxy for thousands of students] …

Well, that doesn’t sound anything near to an explanation. Possibly, on your behalf, bloglines makes the huge number of fetches from us. Bloglines is anyway known for mishandling of blogs. Contrary to what the advertise, the inturn end up making our servers more loaded than otherwise.

Hope you understand.

Admin
***

I dont think so. I have checked access logs of my blog. Bloglines checks only once in an hour. I think that it will infact reduce the traffic from the server, as bloglines is serving hundreds of users from their server. Or in the worst case it will no way increase the traffic. I am observing queries for their site at proxy. I dont really see any heavy trafic at all. There is hardly any.

Can anyone explain to me what the Admin mean by ‘bloglines is known for mishandling of blogs’ ?? Or is it that they hate bloglines for stealing their trafficsmile

I am now addicted to bloglines. It saves almost half of time in reading feeds as compared to my old client - thunderbird. Its real good.

Todays Links -
* Search concepts, not keywords, IBM tells business
* Imagine Cup 2006 in India
* Leadership and B-Schools

Opera Embedding BitTorrent Client

Thursday, July 7th, 2005

wow…
makes me think returning back to home

slashdot article

BitTorrent can really not be ignored, afterall it accounts for 35% of internet traffic.[1]
No doubt BitTorrent uses an amazing technology. Salute to the developer.

well… looks like ppl have started developing something like this for firefox also. waiting…
Its a great idea if someone is looking for some good project. Any hackers around ??

related :
June 20th, 04 : linux :: migrating from opera to mozilla
June 21st, 04 : linux :: tweaking with firefox
June 22nd, 04 : another day with firefox

[1] source : http://in.tech.yahoo.com/041103/137/2ho4i.html