User:Chiragjain1989

From Sugar Labs
Jump to navigation Jump to search
  ==SPEECH SYNTHESIS IN SUGAR CORE==
  ===INTRODUCTION===

---

The main of sugar is to spread the fruit of literacy across the world. They have come up with a low cost children specific laptop. Sugar is the GUI of the laptop. Sugar Labs is participating in this year Google Summer of Code program. The efforts made by sugar in achieving their goal has always impressed me a lot.
This year, one of the project ideas of sugar is speech synthesis which is the enhancement over the last year OLPC GSoC speech dispatcher project. This project was handled by my college senior Mr. Hemant. I appreciate his efforts as the project was really a tough one.
But due to changes in the sugar architecture, the speech dispatcher has become a system daemon. So the need is to develop a new API which can easily collaborate with the existing sugar framework. One good option is gstreamer plugin.
This year for GSoC, I have proposed for speech synthesis in core sugar. My basic idea is to use the gstreamer plugin and provide speech capability to all the existing sugar activities. My aim is to give speech whatever and whereever any text is selected. A button or a keyboard shortcut will be assigned for it.
  ====current status====
March 23- April 3
Right now I have already applied for the GSoC. My proposal can be seen at http://wiki.sugarlabs.org/go/speech-synthesis
For any suggestions or errors please do mail me at chiragjain1989@gmail.com
Right now I am preparing some code related to this framework that I can show up in my application proposal.
March 30
The code I have prepared is the base of my framework. By using this code any selected text can be spoken by the framework. The code is as shown below. First download the code espeak.py from the following link:
  http://git.sugarlabs.org/projects/listen-spell/repos/mainline/blobs/master/espeak.py
after that u can try this code....


                       import gtk
                       from espeak import espeak
                       obj=espeak()
                       clip=gtk.Clipboard(display=gtk.gdk.display_get_default(),selection="PRIMARY")
                       text=clip.wait_for_text()
                       if text==None:
                           obj.speak("Sorry! No text is selected")
                       else:
                           obj.speak(text)