Friday, June 12, 2009

KTTSD using speech-dispatcher

Hey all, lately I've been working a bit on porting kttsd to use speech-dispatcher as per Gary Cramblitt (previous kttsd maintainer)'s design from back in 2005. Anyway, I thought I'd give a bit of a progress report on the effort here.

First a quick summary of Gary's design though. The idea is that speech-dispatcher will do most of the work previously done by kttsd (job management, synthesizer communication, etc.) which is simplifying kttsd's codebase quite a bit. The reason to switch to using speech-dispatcher is that it's a system app, so console apps can use it to synthesize text, kde apps (directly or via kttsd) can use it also, and it will do all job management, so apps wont be trying to talk at the same time, etc. Also gnome is switching to use speech-dispatcher exclusively for 3.0 release.

So status, I've got two machines both running speech-dispatcher 0.6.7 (configured with festival and espeak) and kttsd notifications are going there directly and working fine. There's still some work to do to get the job manager in kttsd to show all jobs from speech-dispatcher, and figure out how to represent all the voices speech-dispatcher has configured in the kttsd talker tab, but it is functional. I've got all the plugins for synthesizers removed from my branch, and took out the sentence boundary detector plugin also, as all that is done by speech-dispatcher. I'll be working closely soon with speech-dispatcher itself, adding some missing functionality to fill in the gaps of what kttsd used to be able to do and speech-dispatcher currently can't do yet (basic stuff like which job is currently being spoken, repeating jobs, etc.).

I've also removed the output methods (alsa and phonon) from the branch, as speech-dispatcher sends the output to the speakers itself. This avoids a bug we've had since 4.0 where when using phonon and the xine backend, speech got cut off quite often.

I hope to have kttsd using speech-dispatcher exclusively by 4.4 and have it provide a gui to set up speech-dispatcher also (besides prioritizing the available talkers that speech-dispatcher provides). My end goal is to have a setup where I can set apps like kopete and konversation to send new message notifications to kttsd, have it filter the notifications, and speak them. Obviously much more will be possible, but that's my itch anyway =)

P.S. if you want to try the branch, it's at https://svn.kde.org/home/kde/branches/work/kdeaccessibility-kttsd-using-speechd/kttsd