HomeForumsOpenEarsListening time

This topic has 3 voices, contains 7 replies, and was last updated by  Halle 154 days ago.

Viewing 8 posts - 1 through 8 (of 8 total)
Author Posts
Author Posts
May 12, 2011 at 2:19 pm #4048

jimmyno

Hello, sorry to bother :) here I am with another question: how can I have the speech time before the system starts processing? At the moment It starts a timer when the function “StartListening” is called (when it hears something). This timer doesn’t stop when it hears silence, but it stops when it has ended the analysis and the processing. In other words, when it is ready to give an answer to what
it just listened. As you can see, this calculation is imprecise, because it is spoiled by the processing time. Is there a more accurate way to do that? I want the sole speech time, without the processing time.
Thanks in advance

May 12, 2011 at 2:47 pm #4049

Halle

Hi Jimmyno,

If this is for your own reference, you can just turn on OPENEARSLOGGING and then look at the timestamps for the different phases of recognition in the console. If this is for a user-facing method, I would need more precision about what you have already done and why it isn’t working for you, or what features of OpenEars you are making use of. I’m confused about what “it” is in in the sentence “it starts a timer” so I can’t give you any advice on that.

May 12, 2011 at 10:06 pm #4050

jimmyno

Hi again, sorry but my english is not very good. By “it” I mean the program. I asked the program to count the time people have talked and give to me that number. At the moment, the program counts time starting from when people start talking. As soon as it hears silence, it stops listening and it starts processing information and then decides what to answer. When it has finished the entire process, it returns the time I asked for. So what I’m getting now is speech time + processing time. What I would like to have is the sole speech time, as of now processing time is spoiling the count. Here’s the code of the two functions if you need it.
tnx again!

- (void) pocketsphinxDidDetectSpeech {
NSLog(@”Pocketsphinx has detected speech.”); // Log it.
timerAscolto = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(controlloAscolto) userInfo:nil repeats:YES];
}
- (void) pocketsphinxDidReceiveHypothesis:(NSString *)hypothesis recognitionScore:(NSString *)recognitionScore utteranceID:(NSString *)utteranceID {
[timerAscolto invalidate];
timerAscolto= nil;
[timerAscolto release];}

May 13, 2011 at 7:53 am #4051

Halle

OK, got it, thanks for clarifying. There are a few things that happen in that timeframe:

1. speech is detected so Pocketsphinx starts saving up the audio to process later,
2. Pocketsphinx hears some silence so it starts counting to see if it will be a second of silence, which will mean that the speech has ended,
3. one second of silence is detected, so Pocketsphinx begins processing the accumulated audio to find words,
4. a hypothesis is returned.

So, you are currently getting a notification for #1 and #4, and my understanding is that you want to get the time between #1 and #3, is this correct?

Also, is this method a way of giving information to the user or to another part of the app, or is it part of your profiling of the app’s performance and you just need to see the timing somehow (for instance, would it be enough to see it in the console)?

May 14, 2011 at 7:36 am #4052

edgecase

I’d like to second this, I’d be very interested to see a notification fired at #3 when audio recording has stopped and it’s effectively all processing, so I could tell the user that yes, we heard them, but we’re still figuring out what it was they said.

May 14, 2011 at 10:21 am #4053

Halle

That I can add that to the upcoming version.

May 23, 2011 at 2:27 pm #4054

Halle

I have added this as an OpenEarsEventsObserver delegate method in the just-posted OpenEars 0.91, which is called:

- (void) pocketsphinxDidDetectFinishedSpeech

It tells you the moment that Pocketsphinx has decided to attempt to recognize the utterance after the period of silence, so you can time it if you want to. There is more documentation in the new sample app and library.

December 16, 2011 at 1:08 pm #8249

Halle

[EDIT: reply removed at poster's request]

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

You must be logged in to reply to this topic.