Reply To: Detect speech, record it, then chop it up by word.

Home Forums OpenEars Detect speech, record it, then chop it up by word. Reply To: Detect speech, record it, then chop it up by word.

#1021515
Halle Winkler
Politepix

Hi,

RapidEars has an API for receiving start times and end times from individual words:

- (void) rapidEarsDidDetectLiveSpeechAsWordArray:(NSArray *) words
scoreArray:		(NSArray *) 	scores
startTimeArray:		(NSArray *) 	startTimes
endTimeArray:		(NSArray *) 	endTimes 

- (void) rapidEarsDidDetectFinishedSpeechAsWordArray:(NSArray *) 	words
scoreArray:		(NSArray *) 	scores
startTimeArray:		(NSArray *) 	startTimes
endTimeArray:		(NSArray *) 	endTimes 

You have to also set these setters to TRUE where you set up PocketsphinxController:

- (void) setReturnSegments:(BOOL)returnSegments; 
- (void) setReturnSegmentTimes:(BOOL)returnSegmentTimes; 

I’ve never attempted to use these times to do a spot-edit of a SaveThatWave file, and my assumption is that they will be accurate but have some kind of offset since SaveThatWave almost certainly doesn’t use the same instant to start its timing as RapidEars correlates its timing to.