My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Installation  
Instructions for installing WebAnywhere.
Updated Jan 20, 2010 by chisholm...@gmail.com

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:

  • OpenSSL
  • PDO
  • SQLite 3

Note: This no longer seems to be the case. 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

20100120--When installing on a Windows 7 machine Apache complained about not finding ntwdblib.dll which is needed by MySQL so I uncommented MySQL and MSQL from the PHP extensions set up.

Configure Apache for Perl

This is only needed if you want to deploy Festival TTS server on Linux

Install following modules:

  • libapache2-mod-perl2
  • libapache2-mod-musicindex

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 htdocs folder within Apache.
  2. Change the name of the Webanywhere folder from "webanywhere" to "wa"
  3. Adjust the config.php file with the following adjustments: ...
    • Change path of accesses database file: $sql_lite_filename = "C:/webanywhere-accesses.sdb";
  4. Directing your internet browser to http://localhost/wa/ should open the Webanywhere hosted on your computer.
Comment by Asquare...@gmail.com, Jan 27, 2009

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

Thanks, Alex,

Comment by project member jeffrey....@gmail.com, Feb 1, 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 shindepr...@gmail.com, Feb 5, 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 project member hgn...@gmail.com, 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 rogerios...@gmail.com, 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

Comment by luckh...@gmail.com, Feb 16, 2010

installation problem:

Fatal error: Call to a member function bindValue() on a non-object in C:\xampp\xampp\htdocs\wa\wp\wawp.php on line 494

Guess: the database "webanywhere-accesses.sdb" is not allowed to be written.

Right? If yes, could you tell me how to solve that. Or how to avoid the error.

Comment by avinashv...@gmail.com, Oct 8, 2010

Hi all,

I have downloaded the source code zip file (wa) from the downloads. I tried running it on Mac OS X, and I have got an error like
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATEHY000? 14? unable to open database file

I think this is related to $sql_lite_filename = "C:/webanywhere-accesses.sdb"; from config.php.

Can you please let me know what adjustments to be made.

And I also see many "undefined index" errors on browser.php.

Please help me out on the above mentioned problems. I am using Mac OS X(10.6.4) and MAMP server 1.8.4.

Comment by project member hgn...@gmail.com, Oct 8, 2010

It seems that "webanywhere-accesses.sdb" causes many problems. Please confirm the file is writable for Apache (chmod 777 webanywhere-accesses.sdb). Try to change the path to something like "/var/www/htdocs/wa/webanywhere-accessers.sdb". And try "C:\\webanywhere-accesses.sdb" for Windows.

Comment by fs.p...@gmail.com, Nov 24, 2010

Hello, I am from Chile

There is an error in the variable voices["es"] = http://webanywhere.cs.washington.edu/cgi-bin/espeak/getsound.pl?lang=fr&text=$text$', should be voices["es"] = 'http://webanywhere.cs.washington.edu/cgi-bin/espeak/getsound.pl?lang=es&text=$text$'. Change "fr" by "es"

Comment by histron...@gmail.com, Mar 2, 2011
Comment by project member hgn...@gmail.com, May 5, 2011

The mistake of "fr" and "es" has been fixed. Very sorry for this late response!

Comment by deng...@gmail.com, Sep 7, 2011

Hi, Great project with great intent.

I recommend building a working, tested version to release. Without a released version, we don't know which version everyone is talking about here as snapshot right from trunk is a moving target. This makes many discussions not useful and confusing.

Please build a release, and if you need support, ALWAYS mention your released version and platform. This will help us, and help you, as well.

BTW, out of the trunk (up to last night), the installation in Ubuntu is not successful. Click GO on home page will bring you to nowhere and no sound either. What exact steps to make it work out of the box?

Thanks.

Comment by carlasam...@gmail.com, Feb 1, 2012

Hello

I downloaded the latest version of the WebAnywhere?(svn) , but not working on my machine!

Do You can check if everything is ok with the latest version!?

Thank you!


Sign in to add a comment
Powered by Google Project Hosting