mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 05:30:37 +00:00
Cleanup speech synth implementation. Correct recognizer.
This commit is contained in:
parent
a9bc3fe5d9
commit
8320300fdd
5 changed files with 69 additions and 39 deletions
|
@ -48,11 +48,13 @@ static GSSpeechRecognitionServer *sharedInstance;
|
|||
- (void) startListening
|
||||
{
|
||||
// abstract nothing to do...
|
||||
[_engine startListening];
|
||||
}
|
||||
|
||||
- (void) stopListening
|
||||
{
|
||||
// abstract nothing to do...
|
||||
[_engine stopListening];
|
||||
}
|
||||
|
||||
- (void) setDelegate: (id<NSSpeechRecognizerDelegate>)delegate
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#import "GSSpeechRecognitionServer.h"
|
||||
#import <AppKit/NSSpeechRecognizer.h>
|
||||
|
||||
|
||||
@interface GSSpeechRecognizer : NSSpeechRecognizer {
|
||||
}
|
||||
- (id)init;
|
||||
@interface GSSpeechRecognizer : NSSpeechRecognizer
|
||||
@end
|
||||
|
|
|
@ -11,6 +11,12 @@ static int clients;
|
|||
+ (void)initialize
|
||||
{
|
||||
server = [[GSSpeechRecognitionServer sharedServer] retain];
|
||||
|
||||
if (server != nil)
|
||||
{
|
||||
clients++;
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(connectionDied:)
|
||||
|
@ -70,4 +76,20 @@ static int clients;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) startListening
|
||||
{
|
||||
if (server != nil)
|
||||
{
|
||||
[server startListening];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) stopListening
|
||||
{
|
||||
if (server != nil)
|
||||
{
|
||||
[server stopListening];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue