voice: add voice/text-to-speech API and a festival-based voice plugin.
authorKrisztian Litkey <kli@iki.fi>
Mon, 26 Aug 2013 08:12:04 +0000 (11:12 +0300)
committerKrisztian Litkey <kli@iki.fi>
Fri, 10 Jan 2014 15:07:06 +0000 (17:07 +0200)
commit72a62717d4583df1a3a3c7fb8b0454b8c742210e
treefd002e32ebb82de825fc20d87e8b9b7d9f4ca497
parentcacaa435bed377bdd74f4d9431d009471de78f70
voice: add voice/text-to-speech API and a festival-based voice plugin.

This patch takes a first shot at adding voice rendering/text-to-speech
infra to the daemon. The basic API currently support

  - registering voice rendering backends + a set of supported voices
  - unregistering backends
  - querying the set of available voices (for language, dialect, speaker
    gender, age if known, and verbose voice description)
  - requesting text-to-speech rendering using a given voice
  - cancelling an ongoing or queued text-to-speech request

Rendering requests can also provide timeout/queuing preferences as
well as a rendering progress notification callback that can be used
to synchronize voice output with a traditional UI.

Note that, resource/policy integration for TTS is currently missing
altogether.

Also note that upstream libfestival (or more precisely the LISP
interpreter implementation of the Edinburgh speech tools libary) has
a bug which causes an immediate crash of any binary that is dynamically
linked against both libfestival and glibc. The actual bug is the leak
of the symbol 'backtrace' from slib.cc which collides with the backtrace
function of glibc. This symbol should have been declared static in slib
but was not. Because of the name collision, the dynamic linker resolves
it to the address of the function in glibc. In slib backtrace is an
ordinary read-write variable. Obviously bad things happen when slib tries
to change the value of that variable which now actually points to the
code segment of glibc.

The accompanying festival-loader plugin in this patch provides a kludge
to work around this problem without having to patch and recompile all
of festival/the speech tools library. Just load festival-loader before
attempting to load festival-voice and everything should work fine (with
fingers crossed).
22 files changed:
configure.ac
run-voice-test.sh [new file with mode: 0755]
src/Makefile.am
src/client/client.c
src/daemon/client.c
src/daemon/client.h
src/daemon/context.h
src/daemon/daemon.c
src/daemon/plugin.c
src/daemon/recognizer.c
src/daemon/voice.c
src/daemon/voice.h
src/plugins/dbus-client-interface/dbus-client.c
src/plugins/dbus-client-interface/dbus-config.h
src/plugins/festival/Makefile [new file with mode: 0644]
src/plugins/festival/festival-loader.c [new file with mode: 0644]
src/plugins/festival/festival-voice.c [new file with mode: 0644]
src/plugins/festival/festival-voice.h [new file with mode: 0644]
src/plugins/festival/libcarnival.cc [new file with mode: 0644]
src/plugins/festival/libcarnival.h [new file with mode: 0644]
src/plugins/festival/pulse.c [new file with mode: 0644]
src/plugins/festival/pulse.h [new file with mode: 0644]