mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 02:20:37 +00:00
Cleanup and some minor changes
This commit is contained in:
parent
92e00382c0
commit
a9bc3fe5d9
2 changed files with 34 additions and 22 deletions
|
@ -54,10 +54,6 @@ static const arg_t cont_args_def[] = {
|
|||
|
||||
@implementation PocketsphinxSpeechRecognitionEngine
|
||||
|
||||
+ (void)initialize
|
||||
{
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
|
@ -93,7 +89,7 @@ static const arg_t cont_args_def[] = {
|
|||
* NOTE: This code is derived from continuous.c under pocketsphinx
|
||||
* which is MIT licensed
|
||||
* Main utterance processing loop:
|
||||
* for (;;) {
|
||||
* while (YES) {
|
||||
* start utterance and wait for speech to process
|
||||
* decoding till end-of-utterance silence will be detected
|
||||
* print utterance result;
|
||||
|
@ -157,7 +153,6 @@ static const arg_t cont_args_def[] = {
|
|||
withObject: recognizedString
|
||||
waitUntilDone: NO];
|
||||
NSDebugLog(@"RECOGNIZED WORD: %s", hyp);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
if (ps_start_utt(ps) < 0)
|
||||
|
@ -175,12 +170,11 @@ static const arg_t cont_args_def[] = {
|
|||
|
||||
- (void) startListening
|
||||
{
|
||||
/*
|
||||
_listeningThread = [[NSThread alloc] initWithTarget: self
|
||||
selector: @selector(recognize)
|
||||
object: nil];
|
||||
[_listeningThread start];*/
|
||||
[self recognize];
|
||||
_listeningThread =
|
||||
[[NSThread alloc] initWithTarget: self
|
||||
selector: @selector(recognize)
|
||||
object: nil];
|
||||
[_listeningThread start];
|
||||
}
|
||||
|
||||
- (void) stopListening
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue