Difference between revisions of "Speech"

From PaparazziUAV
Jump to navigation Jump to search
m (Add install command for espeak, is not included by default with Ubuntu 16.04)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>GCS</categorytree>
__TOC__
==Speech==
==Speech==


The [[GCS]] is able to provide the messages of the console via the speakers by starting with the option -speech. Therefore a few more packages have to be installed and configured.
The [[GCS]] is able to provide the messages of the console via the speakers by starting with the option [[GCS_Configuration|-speech]].  
The following Instruction is made for Ubuntu 8.04 but should work also on other OS.
 
'''On Ubuntu this works out of the box with speech-dispatcher and espeak.'''
 
Make sure speech-dispatcher and espeak are installed
sudo apt-get install speech-dispatcher espeak
 
You can test your setup with
spd-conf -d
 
'''On OS X (10.6 tested) this works out of the box with say.'''
 
You can test your setup with
say "whatever you want your computer to say"


===1. Packages Installation===
Note that in OS X, multiple calls in quick succession from the GCS will start multiple say processes, resulting in multiple messages being spoken at the same time, making it sound rather garbled. This tends to happen when the GCS is first initialized.
Install festival, spech-dispatcher and speech-dispatcher-festival packages, if not already installed <br>
===2. Configuration===
edit festival.conf in /etc/speech-dispatcher/modules/ and change or uncomment the following lines: <br>
  # Address where the Festival server runs (you have to <br>
  # have a Festival server running, please see documentation). <br>
  <br>
  FestivalServerHost  "localhost" <br>
  FestivalServerPort  1314 <br>
  <br>
  FestivalAudioOutputMethod "alsa" <br>


You might first have to get change permission to do that:
== Using festival ==
If you want to use festival instead you need to install some packages and configure the speech-dispatcher to use festival.


  sudo chmod a+rwx /etc/speech-dispatcher/modules/festival.conf
=== Packages Installation===
Install festival, speech-dispatcher, speech-dispatcher-festival and python-speechd packages, if not already installed. <br>
  sudo apt-get install festival speech-dispatcher speech-dispatcher-festival python-speechd


<br>
=== Configuration===
Then edit speechd.conf in /etc/speech-dispatcher/<br>
Edit '''speechd.conf''' in /etc/speech-dispatcher/ with the command
sudo gedit /etc/speech-dispatcher/speechd.conf


   Port 6560<br>
   AddModule "espeak"      "sd_espeak"  "espeak.conf"<br>
  <br>
  #AddModule "espeak"      "sd_espeak"  "espeak.conf"<br>
   AddModule "festival"    "sd_festival"  "festival.conf"<br>
   AddModule "festival"    "sd_festival"  "festival.conf"<br>
   #AddModule "flite"        "sd_flite"    "flite.conf"<br>
   #AddModule "flite"        "sd_flite"    "flite.conf"<br>
Line 34: Line 41:
   #AddModule "cicero"        "sd_cicero"    "cicero.conf"<br>
   #AddModule "cicero"        "sd_cicero"    "cicero.conf"<br>
   <br>
   <br>
   DefaultModule festival<br>
   DefaultModule festival
 
 
'''Optionally''' edit festival.conf in /etc/speech-dispatcher/modules/ and change/uncomment the following lines (these are the defaults so they don't need to be uncommented if not changed): <br>
  # Address where the Festival server runs (you have to <br>
  # have a Festival server running, please see documentation).
   <br>
   <br>
   #LanguageDefaultModule "en" "espeak"<br>
   FestivalServerHost "localhost" <br>
   LanguageDefaultModule "en" "festival"<br>
   FestivalServerPort  1314
  #LanguageDefaultModule "cs"  "festival"<br>
  #LanguageDefaultModule "es"  "festival"<br>


Again, you might first have to get change permission to do that:
=== Starting the applications/servers===
Type in the command window:<br>
festival --server
 
You can test with
spd-conf --test-festival
spd-conf -d
 
You might have to kill your current speech-dispatcher for the changes to take effect.


sudo chmod a+rwx /etc/speech-dispatcher/speechd.conf
Start the [[GCS_Configuration|GCS]] with the -speech option and there you go!


===3. Starting the applications/servers===
[[Category:GCS]] [[Category:User_Documentation]]
Type in the command window:<br>
<tt>festival --server <br>
sudo /etc/init.d/speech-dispatcher restart</tt><br>
and there you go! (Hopefully)

Latest revision as of 03:27, 28 November 2017

Speech

The GCS is able to provide the messages of the console via the speakers by starting with the option -speech.

On Ubuntu this works out of the box with speech-dispatcher and espeak.

Make sure speech-dispatcher and espeak are installed

sudo apt-get install speech-dispatcher espeak

You can test your setup with

spd-conf -d

On OS X (10.6 tested) this works out of the box with say.

You can test your setup with

say "whatever you want your computer to say"

Note that in OS X, multiple calls in quick succession from the GCS will start multiple say processes, resulting in multiple messages being spoken at the same time, making it sound rather garbled. This tends to happen when the GCS is first initialized.

Using festival

If you want to use festival instead you need to install some packages and configure the speech-dispatcher to use festival.

Packages Installation

Install festival, speech-dispatcher, speech-dispatcher-festival and python-speechd packages, if not already installed.

sudo apt-get install festival speech-dispatcher speech-dispatcher-festival python-speechd

Configuration

Edit speechd.conf in /etc/speech-dispatcher/ with the command

sudo gedit /etc/speech-dispatcher/speechd.conf
  AddModule "espeak"       "sd_espeak"   "espeak.conf"
AddModule "festival" "sd_festival" "festival.conf"
#AddModule "flite" "sd_flite" "flite.conf"
#AddModule "espeak-generic" "sd_generic" "espeak-generic.conf"
#AddModule "epos-generic" "sd_generic" "epos-generic.conf"
#AddModule "dtk-generic" "sd_generic" "dtk-generic.conf"
#AddModule "ibmtts" "sd_ibmtts" "ibmtts.conf"
#AddModule "cicero" "sd_cicero" "cicero.conf"

DefaultModule festival


Optionally edit festival.conf in /etc/speech-dispatcher/modules/ and change/uncomment the following lines (these are the defaults so they don't need to be uncommented if not changed):

  # Address where the Festival server runs (you have to 
# have a Festival server running, please see documentation).
FestivalServerHost "localhost"
FestivalServerPort 1314

Starting the applications/servers

Type in the command window:

festival --server

You can test with

spd-conf --test-festival
spd-conf -d

You might have to kill your current speech-dispatcher for the changes to take effect.

Start the GCS with the -speech option and there you go!