TTS (Text to Speech): Difference between revisions
No edit summary |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
Once Festival is installed you need to edit the following file and make the required changes. | Once Festival is installed you need to edit the following file and make the required changes. | ||
/usr/share/festival/festival.scm<br> | For CentOS 5.6 and below '''/usr/share/festival/festival.scm'''<br> | ||
For CentOS 6.0 and above '''/usr/share/festival/lib/festival.scm'''<br><br> | |||
Add the following contents to the end of the file but place it above the last line. | Add the following contents to the end of the file but place it above the last line. | ||
<pre> | <pre> | ||
Line 27: | Line 28: | ||
</pre> | </pre> | ||
Find the line defvar server_access_list and change the localhost settings with | Find the line defvar server_access_list and change the localhost settings with the following.<br> | ||
Make sure to change the line hostname.mydomain.com with the FQDN of the server. | Make sure to change the line hostname.mydomain.com with the FQDN of the server. | ||
<pre> | <pre> | ||
'("localhost\\.localdomain" "localhost" "hostname.mydomain.com") | '("localhost\\.localdomain" "localhost" "hostname.mydomain.com") | ||
</pre> | |||
== Starting Festival == | |||
From the Linux CLI runn the following command to run Festival. From here you can see any errors that occur. Once Festival is working it can be placed in the startup file. You will need to have 2 sessions active. One for the Festival sessions and one for Asterisk. This will allow you to see both sides for any errors. | |||
<pre> | |||
/usr/bin/festival --server | |||
</pre> | |||
=== Starting Festival at Startup === | |||
Edit the file /etc/rc.d/rc.local and add the following line.<br> | |||
/etc/rc.d/rc.local | |||
<pre> | |||
/usr/bin/festival --server & | |||
</pre> | </pre> | ||
Line 46: | Line 60: | ||
[http://www.neospeech.com NeoSpeech] is a TTS appliction that is much more fluid than Festival. NeoSpeech can be purchased from [http://www.nextup.com/neospeech.html NextUp] for under AU$50. | [http://www.neospeech.com NeoSpeech] is a TTS appliction that is much more fluid than Festival. NeoSpeech can be purchased from [http://www.nextup.com/neospeech.html NextUp] for under AU$50. | ||
[[Category : Asterisk ]] | [[Category : Asterisk ]] [[category : Google]] |
Latest revision as of 02:08, 5 November 2013
TTS; Short for text-to-speech, a form of speech synthesis that converts text into spoken voice output. TTS systems were first developed to aid the visually impaired by offering a computer-generated spoken voice that would "read" text to the user.
Festival
Festival is a Linux TTS application that is used with an Asterisk application called Festival. The voice from Festival is pretty raw and is very synthesised. It's free and it does work.
Installation
To install festival is quite easy. It is just a matter of using the CentOS repository.
yum install festival
Configuration for Asterisk
Once Festival is installed you need to edit the following file and make the required changes.
For CentOS 5.6 and below /usr/share/festival/festival.scm
For CentOS 6.0 and above /usr/share/festival/lib/festival.scm
Add the following contents to the end of the file but place it above the last line.
;;; Command for Asterisk begin (define (tts_textasterisk string mode) "(tts_textasterisk STRING MODE) Apply tts to STRING. This function is specifically designed for use in server mode so a single function call may synthesize the string. This function name may be added to the server safe functions." (utt.send.wave.client (utt.wave.resample (utt.wave.rescale (utt.synth (eval (list 'Utterance 'Text string))) 5) 8000))) ;;; Command for Asterisk end
Find the line defvar server_access_list and change the localhost settings with the following.
Make sure to change the line hostname.mydomain.com with the FQDN of the server.
'("localhost\\.localdomain" "localhost" "hostname.mydomain.com")
Starting Festival
From the Linux CLI runn the following command to run Festival. From here you can see any errors that occur. Once Festival is working it can be placed in the startup file. You will need to have 2 sessions active. One for the Festival sessions and one for Asterisk. This will allow you to see both sides for any errors.
/usr/bin/festival --server
Starting Festival at Startup
Edit the file /etc/rc.d/rc.local and add the following line.
/etc/rc.d/rc.local
/usr/bin/festival --server &
Using Festival
;Festival Test exten => 99,1,Answer() exten => 99,n,Festival(Hello. My name is festival voice) exten => 99,n,Festival(You dialled number ${EXTEN}) exten => 99,n,Festival(Goodbye) exten => 99,n,Hangup
NeoSpeech
NeoSpeech is a TTS appliction that is much more fluid than Festival. NeoSpeech can be purchased from NextUp for under AU$50.