Chiragjain1989
Joined 23 March 2009
New page: ==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 spec... |
No edit summary |
||
| Line 21: | Line 21: | ||
: Right now I am preparing some code related to this framework that I can show up in my application proposal. | : 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) | |||