My favorites | Sign in
Project Logo
                
Search
for
Updated Nov 27, 2009 by hgneng
Installation  
Instructions for installing WebAnywhere.

Contents

Introduction

Configuring

Deploy Web Server

Installing Apache Webserver

  1. Download & Install Apache Webserver (also called Apache http server
  2. Install PHP and make sure it is applied to the Webserver

Installing PHP

Required modules:

For windows PHP installer, SQLite 2 is the default. To install SQLite 3, You may need to do following:

  1. download php_pdo_sqlite.dll to PHP/ext/
  2. edit php.ini. change "extension=php_sqlite.dll" to "extension=php_pdo_sqlite.dll"
  3. restart Apache

Configure Apache for Perl

This 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 Festival

Use following command if you are using Debian based Linux:

sudo apt-get install festival

Launch Festival Server

festival --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::Festival

cpan -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.pl

The 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.php

We 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 eSpeak

Please 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.pl

We 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.php

Like 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 Ekho

Please refer to http://www.eguidedog.net/ekho.php The TTS server function works since verion 2.1 for Linux.

Launch Ekho TTS server

ekho --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.pl

We 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.php

Like Festival, we need to set following line:

$sound_url_base = 'http://localhost/perl/ekho_agent.pl?text=$text$&cache=1&mtts=1';

Deploy Webanywhere

Downloading the Code

  1. Install svn on the computer and checkout the code from this site.

Setting Up Webanywhere in Apache

  1. Move the downloaded WebAnywhere code into the ?? folder where Apache gets the information to host.
  2. Adjust the config.php file with the following adjustments: ...
    • Change path of accesses database file: $sql_lite_filename = "C:/webanywhere-accesses.sdb";
  3. Directing your internet browser to: ??? should now go the WebAnywhere hosted on your computer.

Comment by Asquared21, Jan 27, 2009

Hi, this instructions don't work for Linux. What to change the sqlite file to.

Thanks, Alex,

Comment by jeffrey.bigham, Feb 01, 2009

Hi Alex,

Change the sqlite file to whatever path you prefer. The chosen directory needs to exist and Apache needs write permission.

Thanks, Jeff

Comment by shindepradeeps, Feb 05, 2009

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

Comment by hgneng, Apr 11, 2009

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.

Comment by rogerioserpa, Apr 19, 2009

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


Sign in to add a comment
Hosted by Google Code