Perlbox::VoiceServer - Unified interface for the rapid creation of voice enabled applications.


 This document refers to version 0.7 of Perlbox::VoiceServer of Perlbox Voice Application Framework,
 release date 1 18 2004


 use Perlbox::VoiceServer
 my $voice_server     =Perlbox::VoiceServer->new;
 $voice_server->say(string to_say,int priority);


 Creates an easy to use programmers API for rapidly creating voice enabled applications
 for the Linux and *nix operating sytems. The methods available from this class are
 complete for creating, controling and configuring responsive voice enabled apps.
 This is the main and only interface for controling the Perlbox Voirce Application Framework.
 The Sphinx2 listenening agent should be installed on the local system, with the optional
 Festival Speech Synthesis System
 use Perlbox::VoiceServer
 Load the VoiceServer module.
 my $voice_server =Perlbox::VoiceServer->new;
 create a new instance of the voice server

Controling the Listener

 Start a PerlboxListener and Sphinx if none exists.
 sub start_listener()
 Stop the currently running listener. This stops any running PerlboxListener and Sphinx process.
 sub stop_listener()
 -no parameters
 -returns status as string
 kill all  currently running sphinx process
 sub killall
 -no parameters
 -returns status as string
 Check for generated messages from the Server. These are generaly used as
 responses to the user.
 sub check_messages()
 -no parameter
 -this should be called on a set interval, say once a second, the return is
new status messages

Voice Response

 Make a new vocabulary from parallel lists of $phrase - $execute array references
 sub create_language_model(<string>$phrase,<string>$execute)
 -$phrase = what the human will say;
 -$execute = what the computer will execute;
 -returns status as string
 sub commands_toarray accepts two array references and fills them
 with values from the config pertaining to commands. This method is
 taken from and writes to the users config file
 sub commands_toarrays ()
 -$phrase = what the human will say;
 -$execute = what the computer will execute;
 -returns status as string
 Test a text entry to be safe for creating a new vocabulary
 sub validate_vocabulary_entry(<string>$entry)
 -1 parameter
 -returns 0 on failure;
 -returns 1 on success

Voice Synthesis

 Call to voice response system to 'say' "text"
 sub say(<string>$text,<int>$priority)
 -$text= the text for the Festival speaker
 -$priority= int 0 to 10 of importance

Display Documentation

 start the tutorial in the default help browser
 sub start_tutorial()
 start the API documentation in the default help browser
 sub start_api()
 start the help documentation in the default help browser
 sub start_help()

Configuration Methods

 set the default browser to open help documents
 sub set_helpbrowser(<string>$new_browser)
 get the default browser as a string (eg "mozilla")
 sub get_helpbrowser()
 set the the path for sphinx2continuous executable in config file
 sub set_sphinxpath(<string>$path)
 get the the path for sphinx2continuous
 sub get_sphinxpath
 toggle the speech agent
 sub set_playsound(0=true,1=false)
 Find out is the speaking agent is on
 sub get_playsound()
 -return 0=false 1=true
 set verbosity level (0 does not speak, 10 is a chatterbox)
 sub set_verbosity(0 - 10)
 get verbosity level (0 does not speak, 10 is a chatterbox)
 sub get_verbosity
 -returns 0-10
 path to logo for current Perlbox Voice Applications
 sub get_logopath()

Desktop plugins

 list of desktop plugins, beware: this is a list of desktop_plugin objects!
 sub get_desktop_plugins()
 gets the current desktop plugin from the config file (could be 'none')
 sub get_currrent_desktop_plugin()
 find the current desktop plugin and load it
 sub load_current_desktop_plugin()
 sets the current desktop plugin and then load it.
 sub set_currrent_desktop_plugin


For more information on how to program with perlbox: look at the code.


  Requires Perlbox (All included with this package):
  use Perlbox::Plugins::Desktop;
  Other Requirements:


 Shane C. Mason <>
 Special thanks to: Eric Andrechek (eric at openthought dot net)


 Copyright (c) Date Fri Nov  8 21:11:38 MST 2002
 Author Shane Mason <>
 This file is part of Perlbox Voice.
 Perlbox Voice is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.
 Perlbox Voice is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 GNU General Public License for more details.