JSonic: Speech and sound using HTML5
I've released a new library called JSonic for text-to-speech synthesis and sound playback in browsers supporting HTML5 <audio>. The code is on GitHub along with full documentation of the JS and REST APIs.
The client API is implemented as a Dojo dijit._Widget subclass. Other client implementations are possible as long as they provide the same JS interface. The TTS synthesis is implemented server-side using espeak and Tornado. Other server implementations are possible as long as they adhere to the REST API, and other speech engines can be plugged in rather easily.
The UNC Open Web group is looking to use JSonic to build self-voicing web games for kids with disabilities. I've already ported my Spaceship! game (also available on GitHub) to use it instead of Outfox, and hope deploy it somewhere in the near future.
Bug reports, bug fixes, comments, questions, uses, and so on are welcome. Please use the issue tracker on the GitHub project page when reporting bugs.
pyttsx
pyttsx is a cross-platform text-to-speech package for Python. It has a simple API for producing speech, setting some basic engine properties, and getting start/stop/word callbacks. pyttsx currently supports SAPI5, NSSpeechSynthesizer, and espeak, but it can be extended to support other engines and libraries.
The project BSD licensed and hosted on Launchpad. PyPI tracks downloads for the latest stable version and documentation.
GtkBuilder/Glade on IronPython
Thanks to Stephane for his answer to my query about using GtkBuilder in IronPython. It turns out his Gtk#Beans package provides the magic sauce that is currently missing from gtk# trunk the current stable release.
For completeness, here's the code I sent him that accomplishes the same thing using the older Glade.XML object for those that are interested. It answers a long standing mailing list question about using Glade.XML.Autoconnect in IronPython.
import clr clr.AddReference('gtk-sharp') clr.AddReference('glade-sharp') import Gtk import Glade def PyGladeAutoconnect(gxml, target): def _connect(handler_name, event_obj, signal_name, *args): name = ''.join([frag.title() for frag in signal_name.split('_')]) event = getattr(event_obj, name) event += getattr(target, handler_name) # add all widgets for widget in gxml.GetWidgetPrefix(''): setattr(target, gxml.GetWidgetName(widget), widget) # connect all signals gxml.SignalAutoconnectFull(_connect) class Application: def __init__(self): gxml = Glade.XML("test.glade", "window1", None) PyGladeAutoconnect(gxml, self) # window1 comes from glade file self.window1.ShowAll() def onWindowDelete(self, o, args): # connected via glade file definition Gtk.Application.Quit() Gtk.Application.Init() app = Application() Gtk.Application.Run()