2020-02-01 10:43:06 +00:00
|
|
|
#import "GSSpeechRecognitionEngine.h"
|
2020-02-01 10:57:32 +00:00
|
|
|
// #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:57:32 +00:00
|
|
|
@interface PocketsphinxSpeechRecognitionEngine : GSSpeechRecognitionEngine
|
2020-02-01 10:43:06 +00:00
|
|
|
{
|
2020-01-30 21:28:18 +00:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2020-02-01 10:57:32 +00:00
|
|
|
@implementation PocketsphinxSpeechRecognitionEngine
|
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
|