libs-gui/Tools/speech_recognizer/PocketsphinxSpeechRecognitionEngine.m

31 lines
639 B
Mathematica
Raw Normal View History

2020-02-01 10:43:06 +00:00
#import "GSSpeechRecognitionEngine.h"
#include <pocketsphinx/pocketsphinx.h>
2020-01-30 21:28:18 +00:00
/**
2020-02-01 10:43:06 +00:00
* Implementation of a speech engine using pocketsphinx. This should be the default
2020-01-30 21:28:18 +00:00
* for resource-constrained platforms.
*/
2020-02-01 10:43:06 +00:00
@interface PocketsphinxSpeechEngine : GSSpeechRecognitionEngine
{
2020-01-30 21:28:18 +00:00
}
@end
2020-02-01 10:43:06 +00:00
@implementation PocketsphinxSpeechEngine
2020-01-30 21:28:18 +00:00
+ (void)initialize
{
}
- (id)init
{
if (nil == (self = [super init])) { return nil; }
return self;
}
@end
2020-02-01 10:43:06 +00:00
@implementation GSSpeechRecognitionEngine (Pocketsphinx)
+ (GSSpeechRecognitionEngine*)defaultSpeechRecognitionEngine
2020-01-30 21:28:18 +00:00
{
2020-02-01 10:43:06 +00:00
return [[[PocketsphinxSpeechRecognitionEngine alloc] init] autorelease];
2020-01-30 21:28:18 +00:00
}
@end