Integrating With Speech Dispatcher

Speech Dispatcher provides a device independent layer for speech synthesis. To integrate dhvani with speech dispatcher first install speech-dispatcher using your package manager. After installing speech dispatcher, you can verify whether it is running or not by running this command at terminal

spd-say hello
If this command read 'hello' , it is working fine. If it is not speaking anything, check whether speech-dispatcher is running or not. You can start the speech-dispatcher daemon using
sudo /etc/init.d/speech-dispatcher start

Now download this generic driver configuraton file and place it in /etc/speech-dispatcher/modules folder. Then edit the /etc/speech-dispatcher/speechd.conf file. Add the following line in OUTPUT MODULES CONFIGURATION section

AddModule "dhvani-generic" "sd_generic" "dhvani-generic.conf"
And set the default output module as dhvani-generic. You will see this as espeak in the configuration file. Edit it and change it like this
DefaultModule dhvani-generic

We need to restart the speech-dispatcher to make the changes active.
sudo /etc/init.d/speech-dispatcher restart
Now try this command
spd-say നമസ്കാരം

Using with Python-Speech Dispatcher

Install python speech dispatcher binding - python-speechd package using your package manager. The following code illustrates how to use the speechd python binding with dhvani.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Test program for dhvani generic speech dispatcher driver
import speechd
client = speechd.SSIPClient('test')
print 'done'

Using dhvani with Orca

Speech dispatcher acts as a bridge between Screenreader and TTS engines. To use Orca with speech-dispatcher, get choose the speech dispatcher as the speech sytem in Orca preferences. You can get this window by running orca in terminal. Click on preferences button and A dialog windows to configure the Orca preferences will appear. Go to speech tab and select speed dispatcher as the speech system. Now in Speech synthesizer, you can see all the speech synthesizers configured with speech dispatcher. Select dhvani-generic from that. Refer the below image:
Since dhvani is not an english text to speech system, you need to take any of the Indian language localized desktops such as gnome or KDE and should use orca with that.