Speech-Recognizer-SPX
view release on metacpan or search on metacpan
- The only thing missing before this can be released is
documentation and a test suite, I think.
0.04 Mon Dec 4 17:34:34 EST 2000 (UNRELEASED)
- Add cepstral analysis (Sphinx2::FE) methods.
- Make Sphinx2::Audio::init and Sphinx2::Audio::Continuous::init
class methods.
- Fix tty-continuous.
0.03 Sun Dec 03 14:17:46 2000 (UNRELEASED)
- Add a server module and a demo of streaming audio to Sphinx
over the network. Remove the really broken and stupid
pipe-demo.pl :)
0.02_01 Fri Dec 01 11:29:46 2000 (UNRELEASED)
- Add copyright notices.
0.02 Fri Dec 01 00:42:57 2000 (UNRELEASED)
- Fix the interface, removing evil autoload.
- Add the option to specify one's own ARGV to fbs_init()
- Add a hacked-up continuous-audio-from-random-file API.
SPX/Server.pm view on Meta::CPAN
# -*- cperl -*-
use strict;
# Speech::Recognizer::SPX::Server: Perl module for writing PocketSphinx
# streaming audio servers.
# Copyright (c) 2000 Cepstral LLC.
#
# This module is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
# Written by David Huggins-Daines <dhuggins@cs.cmu.edu>
package Speech::Recognizer::SPX::Server;
use Speech::Recognizer::SPX qw(:fbs :uttproc $SPHINXDIR);
SPX/Server.pm view on Meta::CPAN
sub fini {
fbs_end();
}
1;
__END__
=head1 NAME
Speech::Recognizer::SPX::Server - Perl module for writing streaming audio speech recognition servers using PocketSphinx
=head1 SYNOPSIS
my $sock = new IO::Socket(... blah blah blah ...);
my $log = new IO::File('server.log');
my $audio_fh = new IO::File('speech.raw');
my $srvr
= Speech::Recognizer::SPX::Server->init({ -arg => val, ... }, $sock, $log, $verbose)
or die "couldn't initialize pocketsphinx: $!";
SPX/Server.pm view on Meta::CPAN
print "recognized text is $txt\n";
...
}
$srvr->fini or die "couldn't shut down server: $!";
exit 0;
}
=head1 DESCRIPTION
This module encapsulates a bunch of the stuff needed to write a
PocketSphinx server which takes streaming audio as input on an arbitrary
filehandle. It's not meant to be flexible or transparent - if you
want that, then read the code and write your own server program using
just the Speech::Recognizer::SPX module.
The interface is vaguely object-oriented, but unfortunately it is
presently not possible to create multiple instances of
Speech::Recognizer::SPX::Server within the same process, due to severe
limitations of the underlying PocketSphinx library. You can, however,
create multiple distinct servers with judicious use of C<fork>, as
shown in the example above.
server-demo view on Meta::CPAN
#!/usr/bin/perl
# server-demo: demo of streaming audio to PocketSphinx over a socket.
# Copyright (c) 2000 Cepstral LLC.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
# Written by David Huggins-Daines <dhuggins@cs.cmu.edu>
use strict;
use Speech::Recognizer::SPX::Server;
( run in 0.270 second using v1.01-cache-2.11-cpan-4d50c553e7e )