Festival as Gstreamer-plugin

One must have working gstreamer installation prior to this.

*) Install the packages:

$ sudo apt-get install festival festival-dev gstreamer-tools

*) Configure your /etc/festival.scm as such:

(Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE")
(Parameter.set 'Audio_Method 'Audio_Command)
(set! server_access_list '("localhost\\.localdomain" "localhost"))
;;; Command for Asterisk begin
(define (tts_textasterisk string mode)
(let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string)))))
(utt.wave.resample wholeutt 8000)
(utt.wave.rescale wholeutt 5)
(utt.send.wave.client wholeutt)))
;;; Command for Asterisk end

*) Start the server

$ festival --server

*) Test your installation in another console window

$ echo 'Hello G-Streamer!' | gst-launch fdsrc fd=0 ! festival ! wavparse ! audioconvert ! alsasink

No comments:

Post a Comment