- VERSION
- SYNOPSIS
- DESCRIPTION

- Controling the Listener
- Voice Response
- Voice Synthesis
- Display Documentation
- Configuration Methods
- Desktop plugins
- Magic Word

- SEE ALSO
- FILES
- AUTHOR
- COPYRIGHT

# VERSION

     This document refers to version 0.7-8 of Perlbox::VoiceServer of Perlbox Voice Application Framework,
     release date 12 19 2004

# SYNOPSIS

     use Perlbox::VoiceServer

     my $voice_server     =Perlbox::VoiceServer->new;

     $voice_server->say(string to_say,int priority);

# DESCRIPTION

     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()

     Set the current desktop plugin and then load it.
     sub set_currrent_desktop_plugin

## Magic Word

     Magic words allow you to 'not listen' unless a magic word has been spoken.
     Once this word is spoken, there is an interval where commands will be
     interpreted, else they will be solintly ignored. The command can directly
     follow the magic word, or come within the interval set in perlbox config.

     Are we to use magic words?
     sub get_use_magicword

     sub set_use_magicword

     And what is the magic word?
     sub get_magicword

     sub set_magicword

# SEE ALSO

     For more information on how to program with perlbox: look at the code then drop me an email.

# FILES

      Requires Perlbox (All included with this package):

      Perlbox::Response::VoiceResponse;
      Perlbox::Vocabulary::VocabularyAdd;
      Perlbox::ThirdParty::IPC::Shareable;
      Perlbox::ThirdParty::Config::Simple;
      use Perlbox::Plugins::Desktop;

      Other Requirements:
      None

# AUTHOR

     Shane C. Mason <me@perlbox.org>

     Special thanks to:

     Eric Andrechek (eric at openthought dot net)

     http://perlbox.org

# COPYRIGHT

     Copyright (c) Date Fri Nov  8 21:11:38 MST 2002
     Author Shane Mason <me@perlbox.org>

     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
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.