OpenEars 音声認識キットを使用しようとしていますが、iPhone 3GS では機能しません。チュートリアルで提供されているすべてのコード スニペットを書きましたが、話している間は何も起こりません。これが私のコードです:
LanguageModelGenerator *lmGenerator = [[LanguageModelGenerator alloc] init];
NSArray *words = [NSArray arrayWithObjects:@"EAT", @"DRINK", @"SLOW", @"GO", nil];
NSString *name = @"NameIWantForMyLanguageModelFiles";
NSError *err = [lmGenerator generateLanguageModelFromArray:words withFilesNamed:name forAcousticModelAtPath:[AcousticModel pathToModel:@"AcousticModelEnglish"]]; // Change "AcousticModelEnglish" to "AcousticModelSpanish" to create a Spanish language model instead of an English one.
NSDictionary *languageGeneratorResults = nil;
NSString *lmPath = nil;
NSString *dicPath = nil;
if([err code] == noErr) {
languageGeneratorResults = [err userInfo];
lmPath = [languageGeneratorResults objectForKey:@"LMPath"];
dicPath = [languageGeneratorResults objectForKey:@"DictionaryPath"];
} else {
NSLog(@"Error: %@",[err localizedDescription]);
}
[self.openEarsEventsObserver setDelegate:self];
[self.pocketsphinxController startListeningWithLanguageModelAtPath:lmPath dictionaryAtPath:dicPath acousticModelAtPath:[AcousticModel pathToModel:@"AcousticModelEnglish"] languageModelIsJSGF:NO];