NAME

Speak - Convert text to speech using Google's engine and play it on speakers

VERSION

Author

Andrew DeFaria <Andrew@DeFaria.com>

Revision

$Revision: 1.0 $

Created

Wed 24 Feb 2021 11:05:36 AM PST

Modified

SYNOPSIS

This module offers subroutines to convert text into speach and speak them.

DESCRIPTION

This module exports subroutines to process text to speach and speak them.

ROUTINES

The following routines are exported:

speak($msg, $log, $lang)

Convert $msg to speech.

Parameters:

$msg:

Message to speak. If $msg is defined and scalar then that is the message to speak. If it is a file handle then the text will be read from that file. Otherwise the text in the clipboard will be used.

$log

If provided, errors and messages will be logged to the logfile, otherwise to speak.log

$lang

Language code (e.g. 'en', 'en-gb', 'en-au'). Defaults to $ENV{SPEAK_LANG} or 'en'.

Returns:

Nothing

CONFIGURATION AND ENVIRONMENT

SPEAK_LANG: Language code (e.g. 'en', 'en-gb', 'en-au'). See eg/speak.conf for available languages. Defaults to $ENV{SPEAK_LANG} or 'en'.

SPEAK_MUTE: If set to a true value, speech output is muted. Alternatively, if a file exists at $ENV{HOME}/.speak/shh or /etc/speak/shh, speech is muted.

To silence Speak for while simply touch $ENV{HOME}/.speak/shh
or /etc/speak/shh file. To unsilence Speak, remove the file.

Configuration File

Speak supports a configuration file located at $ENV{HOME}/.speak/speak.conf or /etc/speak/speak.conf.

Format: language: en-gb # other options...

Supported keys: language - Default language code for speech generation.

DEPENDENCIES

Perl Modules

Clipboard

LWP::UserAgent

URI::Escape

BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Andrew DeFaria <Andrew@DeFaria.com>.

LICENSE AND COPYRIGHT

This Perl Module is freely available; 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.

This Perl Module 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 (http://www.gnu.org/copyleft/gpl.html) for more details.

You should have received a copy of the GNU General Public License along with this Perl Module; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. reserved.