|
Installation
Instructions for installing WebAnywhere.
Contents
IntroductionConfiguring Deploy Web ServerInstalling Apache Webserver
Installing PHPRequired modules:
For windows PHP installer, SQLite 2 is the default. To install SQLite 3, You may need to do following:
Configure Apache for PerlThis is only needed if you want to deploy Festival TTS server on Linux Install following modules:
Add following code to apache.conf Alias /perl/ /path/to/perl_scripts/ PerlModule ModPerl::Registry <Location "/perl/"> SetHandler perl-script PerlHandler ModPerl::Registry Options +ExecCGI PerlOptions +ParseHeaders </Location> Deploy Festival TTS Server (optional)It is not a must step to setup WebAnywhere because we could use following TTS server http://webinsight.cs.washington.edu/cgi-bin/getsound.pl?text=hello And this is only applicable for Linux now. Install FestivalUse following command if you are using Debian based Linux: sudo apt-get install festival Launch Festival Serverfestival --server You can also setup festival to run in the background with a command like this: nohup festival --server > /dev/null 2> /dev/null < /dev/null & Install Perl module Speech::Festivalcpan -i Speech::Festival The module is install in xxx/Speech/Speech/Festival.pm. It's a bug. We need to move folders tree as xxx/Speech/Festival.pm. Also, we need to comment out one print statement. sub DESTROY
{
my ($self) = @_;
# print "disconnect\n";
disconnect $self;
}Configure getsound.plThe original version of getsound.pl locates at tts/festival/. We should copy it to the right path, /var/www/perl/ for example. getsound.pl need lame and sox application. Make a symbol link to them under the path of getsound.pl. Change following line to add our own TTS server: my @servers = ('emil.cs.washington.edu', 'brangane.cs.washington.edu');For example, if you have festival running on the same machine as the web server, then the following would be correct: my @servers = ('localhost');The festival server will by default accept connections to localhost. If you want to add an additional TTS server, you'll need to edit the festival.scm file to allow connections from other computers in your domain. For instance, at the University of Washington, I have the following, which enables connections from either localhost or computers whose hostname ends in cs.washington.edu: (defvar server_access_list '(localhost "[^\\.\\\\]+\\.cs\\.washington\\.edu") Configure config.phpWe may need to change following lines. Please make sure web server has writing permission on the directory of webanywhere-accesses.sdb. $sound_url_base = 'http://localhost/perl/getsound.pl?text=$text$&cache=1&mtts=1'; ... $sql_lite_filename = "C:/webanywhere-accesses.sdb"; Deploy eSpeak TTS server (optional)eSpeak can speak many languages. And it's easy to deploy. Install eSpeakPlease refer to http://espeak.sf.net We don't need to launch a eSpeak server like Festival. We just need to make sure command espeak can be run. Configure getsound.plWe need to copy tts/espeak/getsound.pl to some path. This path is hard code in the script. So we need to change following line: my $base_dir = '/home/hgneng/www-perl'; In getsound.pl of espeak, we add a "lang" variable to specify voice in espeak. Configure config.phpLike Festival, we need to set following line: (espeak.pl is a copy of getsound.pl) $sound_url_base = 'http://localhost/perl/espeak.pl?text=$text$&lang=cantonese'; Deploy Ekho TTS server (optional)Ekho is a Chinese(Cantonese/Mandarin) TTS engine. It can also speak English through Festival. Install EkhoPlease refer to http://www.eguidedog.net/ekho.php The TTS server function works since verion 2.1 for Linux. Launch Ekho TTS serverekho --server -v Mandarin To test whether Ekho server works: ekho --request "123" -o output.mp3 A file output.mp3 should be generated. Configure ekho_agent.plWe need to copy tts/ekho/ekho_agent.pl to some path. This path is hard code in the script. So we need to change following line: my $base_dir = '/var/www/cache/'; Configure config.phpLike Festival, we need to set following line: $sound_url_base = 'http://localhost/perl/ekho_agent.pl?text=$text$&cache=1&mtts=1'; Deploy WebanywhereDownloading the Code
Setting Up Webanywhere in Apache
|
Sign in to add a comment
Hi, this instructions don't work for Linux. What to change the sqlite file to.
Thanks, Alex,
Hi Alex,
Change the sqlite file to whatever path you prefer. The chosen directory needs to exist and Apache needs write permission.
Thanks, Jeff
Hi Jeff,
What shound i replace for this: BEGIN {unshift(@INC, '/projects/compression2/webinsight/lib/Speech/','/projects/compression2/webinsight/lib/')}
and i am not found any sqlite file in SVN repository.
Thanks, Pradeep
There are some non-standard Perl modules (ex. Speech::Festival). You should install them and make sure it is in path of @INC.
sqlite is a third party module. Please google for it.
Thanks, Cameron.
Hello I am from Brazil and found the system fantastic, but I am trying to install more is giving this error. What can is happening? Fatal error: Call to undefined function sys_get_temp_dir() in C:\Arquivos de programas\EasyPHP 2.0b1\www\wa\config.php on line 56