Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Speech::Recognizer::ScLite 0.01

    Download button

    No screenshots available
    Downloads: 1,972  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.4/5)
    5 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jeremy Kahn | More programs
    Perl Artistic License / FREE
    August 4th, 2008, 15:32 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Speech::Recognizer::ScLite description

    Speech::Recognizer::ScLite is an object-based wrapper around the sclite tool from the NIST SCTK.

    Speech::Recognizer::ScLite is an object-based wrapper around the sclite tool from the NIST SCTK.

    SYNOPSIS

    # gather the correct and hypothesized readings any way you like.
    # here I assume you have them in two text files that can be parsed
    # successfully by the toy sub read_trans below.
    my (%correct_readings) = read_trans('correct.txt');
    my (%hyp_readings) = read_trans('hypotheses.txt');

    # real work begins here
    use Speech::Recognizer::ScLite;

    # alter the default ('sclite') executable-name or a path to it
    Speech::Recognizer::ScLite->executable(
    '/usr/site/bin/SCTK-1-04/sclite-1-04' );

    my ($scorer) =
    Speech::Recognizer::ScLite->new( 'result_location' => './test_17',
    id => 'Sex');
    # that oughtta increase the CPAN hits

    foreach my $line (sort keys %hyp_readings) {
    # construct an object to represent this version
    # construct any sort key you want. Here we assume that we're
    # interested in breaking out the files based on which directory
    # they're in.
    my ($l) =
    Speech::Recognizer::ScLite::Line->new(
    ref => $correct_readings{$line},
    hyp => hyp_readings{$line},
    sort_key => getSort($line)
    );

    $scorer->lines_push($l);

    } # end of looping over the filenames.

    # computes actual ASR performance, given above information
    $scorer->score();

    # dumps a wordy report into the ->result_location;
    # $scorer->report(); # currently a no-op since score() invokes
    # reporting function within the sclite utility itself


    ################################################################
    # toy subs defined below for the sake of the completeness of the
    # example.
    sub read_trans {
    my (%transcriptions);
    open (FILE, shift); # or die, of course
    while () {
    chomp;
    my ($trans, $file) = split;
    $transcriptions{$file} = $trans;
    }
    close FILE; # or die, of course
    return %transcriptions;
    }
    # this toy sort routine returns the sex of the speaker as the sort
    # key, rather than the (default) speaker directory.
    sub getSort {
    my ($filename) = shift;
    return ($filename =~ /female/i ? 'Female' : 'Male');
    }

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    object-based wrapper | NIST SCTK | Perl module | object-based | wrapper | NIST

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM