mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Fix link errors
This commit is contained in:
parent
2f8e9656a3
commit
20fefae849
4 changed files with 31 additions and 4 deletions
|
@ -19,7 +19,7 @@ GSSpeechRecognitionServer_OBJC_FILES = \
|
|||
|
||||
|
||||
ifeq ($(GSSPEECHRECOGNITIONENGINE), Pocketsphinx)
|
||||
POCKETSPHINX_BASE_LIBS = -lpocketsphinx
|
||||
POCKETSPHINX_BASE_LIBS = -lpocketsphinx -lsphinxbase -lsphinxad
|
||||
|
||||
# Add includes and link dirs.... need to replace triplet.
|
||||
GSSpeechRecognitionServer_OBJC_FILES += PocketsphinxSpeechRecognitionEngine.m
|
||||
|
|
|
@ -5,19 +5,44 @@
|
|||
* Implementation of a speech engine using pocketsphinx. This should be the default
|
||||
* for resource-constrained platforms.
|
||||
*/
|
||||
|
||||
#define MODELDIR "/share/pocketsphinx/model"
|
||||
|
||||
/*
|
||||
ps_decoder_t *ps = NULL;
|
||||
cmd_ln_t *config = NULL;
|
||||
|
||||
config = cmd_ln_init(NULL, ps_args(), TRUE,
|
||||
"-hmm", MODELDIR "/en-us/en-us",
|
||||
"-lm", MODELDIR "/en-us/en-us.lm.bin",
|
||||
"-dict", MODELDIR "/en-us/cmudict-en-us.dict",
|
||||
NULL);
|
||||
|
||||
*/
|
||||
@interface PocketsphinxSpeechRecognitionEngine : GSSpeechRecognitionEngine
|
||||
{
|
||||
ps_decoder_t *ps;
|
||||
cmd_ln_t *config;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation PocketsphinxSpeechRecognitionEngine
|
||||
|
||||
+ (void)initialize
|
||||
{
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (nil == (self = [super init])) { return nil; }
|
||||
if (nil != (self = [super init]))
|
||||
{
|
||||
config = cmd_ln_init(NULL, ps_args(), TRUE,
|
||||
"-hmm", MODELDIR "/en-us/en-us",
|
||||
"-lm", MODELDIR "/en-us/en-us.lm.bin",
|
||||
"-dict", MODELDIR "/en-us/cmudict-en-us.dict",
|
||||
NULL);
|
||||
ps = ps_init(config);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -32,8 +57,10 @@
|
|||
@end
|
||||
|
||||
@implementation GSSpeechRecognitionEngine (Pocketsphinx)
|
||||
|
||||
+ (GSSpeechRecognitionEngine*)defaultSpeechRecognitionEngine
|
||||
{
|
||||
return [[[PocketsphinxSpeechRecognitionEngine alloc] init] autorelease];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -5736,7 +5736,7 @@ done
|
|||
|
||||
if test $have_pocketsphinx = yes -a $have_speech_recognizer = yes -a $enable_speech_recognizer = yes; then
|
||||
BUILD_SPEECH_RECOGNIZER="speech_recognizer"
|
||||
POCKETSPHINX_BASE_LIBS="-lpocketsphinx"
|
||||
POCKETSPHINX_BASE_LIBS="-lpocketsphinx -lsphinxbase -lsphinxad"
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -551,7 +551,7 @@ AC_CHECK_LIB(pocketsphinx, ps_start_utt, have_speech_recognizer=yes, have_speech
|
|||
AC_CHECK_HEADERS(pocketsphinx/pocketsphinx_export.h, have_pocketsphinx=yes, have_pocketsphinx=no)
|
||||
if test $have_pocketsphinx = yes -a $have_speech_recognizer = yes -a $enable_speech_recognizer = yes; then
|
||||
BUILD_SPEECH_RECOGNIZER="speech_recognizer"
|
||||
POCKETSPHINX_BASE_LIBS="-lpocketsphinx"
|
||||
POCKETSPHINX_BASE_LIBS="-lpocketsphinx -lsphinxbase -lsphinxad"
|
||||
fi
|
||||
AC_SUBST(BUILD_SPEECH_RECOGNIZER)
|
||||
|
||||
|
|
Loading…
Reference in a new issue