Speech-Synthesis
view release on metacpan or search on metacpan
lib/Speech/Synthesis.pm view on Meta::CPAN
This takes one or more of the language values as returned by InstalledLanguages()
=item gender
This parameter can be one of the following: 'male', 'female' or 'neutral'.
=back
The voices array that this method returns is an array of hashrefs. Each hashref
contains at least the following keys: 'id', 'name', 'description',
'language', 'gender', 'age'. It may return more keys, depending on what the
selected engine supports. If a key has an undefined value, it simply isn't available.
=head2 @avatars = Speech::Synthesis->InstalledAvatars(engine => $engine)
This class method currently only works for the 'MSAgent' engine (so that's
the only value for the $engine that will actually return anything), and
it will return a list of avatars (MS Agent Characters) that are currently
installed.
=head1 INSTANCE METHODS
=head2 $ss = Speech::Synthesis->new(%options)
This is the constructor. Parameters can be supplied using key/value combinations.
Valid parameters are:
=over 4
=item engine
The value for the 'engine' key can be one of the speech engine values described
in the InstalledEngines class method.
=item host
This is an optional parameter, which is only used for the 'Festival'
engine. It represents the host that the festival server is running on.
If you don't provide it, Speech::Synthesis assumes it's localhost.
=item port
This is an optional parameter, which is only used for the 'Festival'
engine. It represents the port that the festival server is running on.
If you don't provide it, Speech::Synthesis assumes it's 1319.
=item voice
The value of the 'voice' key can be one of the 'id' values as defined in the array
of hashrefs that the InstalledVoices method returns.
=item language
This parameter is mandatory when you specify 'MSAgent' as the engine. It will
be ignored otherwise
=item avatar
This parameter is mandatory when you specify 'MSAgent' as the engine. It will
be ignored otherwise. It is the avatar (or Agent Character) that will
show up on your desktop and "speak" the text for you.
It might be used for other engines in the future.
=item async
This parameter defines wether we will wait until speaking finishes or not.
By default, async = 1. If you want your code to wait until it finishes
speaking, set it to 0. (not supported for MSAgent and SAPI4)
=back
=head2 $o = $ss->getobject()
This method returns the original Perl object that the Speech::Synthesis
module uses at that very moment. It doesn't support Mac::Speech (since
that module doesn't use objects)
=head2 $ss->voice($id)
This method gets or sets the id of the voice. This is the same 'id' as used in the
voices array of hashrefs in the InstalledVoices method.
=head2 $ss->speak($string)
This method speaks the $string using the selected engine and the selected voice.
=head1 BUGS AND CAVEATS
The working of asynchronous speech doesn't work on MSAgent and SAPI5.
=head1 AUTHOR
Jouke Visser, C<< <jouke@pvoice.org> >>
=head1 BUGS
Please report any bugs or feature requests to
C<bug-speech-synthesis@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Speech-Synthesis>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 ACKNOWLEDGEMENTS
=head1 COPYRIGHT & LICENSE
Copyright 2005 Jouke Visser, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut
( run in 2.354 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )