Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • Author
  • in reply to: Support 48000Hz sample rate #1019071

    Because the library makes use of ultrasound, it requires the sample rate higher than 38kHz. The RapidEars library forces the AudioSession to 16kHz which is far less than the requirement..

    And I think sub-sampling from 48kHz to 16kHz is quite easy (only skip 2 & 3 bytes). By supporting this feature RapidEars can also work well with other framework like AirPlay. I think it is valuable to implement.

    in reply to: Wrong recognitionScore when using RapidEars #1018959

    The code is here:

    // somewhere in the .m
    - (void)somewhere
        _controller = [[PocketsphinxController alloc] init];
        _controller.nBestNumber = 1;
        _controller.verbosePocketSphinx = kIsVerbose;
        [_controller setRapidEarsToVerbose:kIsVerbose];
        [_controller setRapidEarsAccuracy:10];
        [_controller setFinalizeHypothesis:TRUE];
        [_controller setFasterPartials:TRUE];
        [_controller setFasterFinals:FALSE];
        [_controller startRealtimeListeningWithLanguageModelAtPath:_pathToDynamicallyGeneratedGrammar
                                               acousticModelAtPath:[self acousticModelPath]];
        // ... set up observer in the following
    - (void) rapidEarsDidReceiveLiveSpeechHypothesis:(NSString *)hypothesis recognitionScore:(NSString *)recognitionScore {
        NSLog(@"rapidEarsDidReceiveLiveSpeechHypothesis: %@ (%@)",hypothesis, recognitionScore);
        _statusLabel.text = [NSString stringWithFormat:@"%@", hypothesis];
    - (void) rapidEarsDidReceiveFinishedSpeechHypothesis:(NSString *)hypothesis recognitionScore:(NSString *)recognitionScore {
        NSLog(@"rapidEarsDidReceiveFinishedSpeechHypothesis: %@ (%p)", hypothesis, recognitionScore);
        _scoreLabel.text = [NSString stringWithFormat:@"%@", recognitionScore];

    I understand the number is not that reliable. But the problem is that the number is not negative number, which is different from OpenEars.

Viewing 2 posts - 1 through 2 (of 2 total)