Speech::Recognizer::SPX::Server

Speech::Recognizer::SPX::Server is a Perl module for writing streaming audio speech recognition servers using Sphinx2.
Download

Speech::Recognizer::SPX::Server Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • David Huggins-Daines
  • Publisher web site:
  • http://search.cpan.org/~djhd/Speech-Recognizer-SPX-0.09/SPX.pm

Speech::Recognizer::SPX::Server Tags


Speech::Recognizer::SPX::Server Description

Speech::Recognizer::SPX::Server is a Perl module for writing streaming audio speech recognition servers using Sphinx2. Speech::Recognizer::SPX::Server is a Perl module for writing streaming audio speech recognition servers using Sphinx2.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 sphinx2: $!"; my $client = new IO::Socket; while (accept $sock, $client) { next unless fork; $srvr->sock($client); $srvr->calibrate or die "couldn't calibrate audio stream: $!"; while (!$done && defined(my $txt = $srvr->next_utterance(sub { print $log "listeningn" }, sub { print $log "not listeningn }, $audio_fh))) { print "recognized text is $txtn"; ... } $srvr->fini or die "couldn't shut down server: $!"; exit 0; }This module encapsulates a bunch of the stuff needed to write a Sphinx2 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 Sphinx-II library. You can, however, create multiple distinct servers with judicious use of fork, as shown in the example above.It is possible that this will be fixed in a future release of Sphinx-II. Requirements: · Perl


Speech::Recognizer::SPX::Server Related Software