NTSpeechRecognizer Protocol Reference
Conforms to | NTAudioSourceDelegate |
---|---|
Declared in | NTSpeechRecognizer.h |
isListening
required method
Current listening state. YES if the recognizer currently is listening for speech. Otherwise NO.
@property (nonatomic, readonly) BOOL isListening
Discussion
Current listening state. YES if the recognizer currently is listening for speech. Otherwise NO.
Same as (isStarted && !isSuspended).
Declared In
NTSpeechRecognizer.h
isStarted
required method
YES if the recognizer was started.
@property (nonatomic, readonly) BOOL isStarted
Discussion
YES if the recognizer was started.
Declared In
NTSpeechRecognizer.h
isSuspended
required method
YES if the recognizer currently is suspended.
@property (nonatomic, readonly) BOOL isSuspended
Discussion
YES if the recognizer currently is suspended.
Declared In
NTSpeechRecognizer.h
dictionary
required method
The dictionary of the recognizer.
@property (nonatomic, strong, readonly) NTPronunciationDictionary *dictionary
Discussion
The dictionary of the recognizer.
Declared In
NTSpeechRecognizer.h
searches
required method
All searches that are registered in this recognizer.
@property (nonatomic, strong, readonly) NSArray<NTSpeechSearch*> *searches
Discussion
All searches that are registered in this recognizer.
Declared In
NTSpeechRecognizer.h
activeSearch
required method
The search currently is active.
@property (nonatomic, strong, readonly) NTSpeechSearch *activeSearch
Discussion
The search currently is active.
Declared In
NTSpeechRecognizer.h
audioSource
required method
The audio source where the recognizer gets input data from.
@property (nonatomic, strong) NTAudioSource *audioSource
Discussion
The audio source where the recognizer gets input data from.
Declared In
NTSpeechRecognizer.h
returnNullHypotheses
required method
Whether the recognizer should notify about NULL Hypotheses.
@property (nonatomic) BOOL returnNullHypotheses
Discussion
Whether the recognizer should notify about NULL Hypotheses.
Declared In
NTSpeechRecognizer.h
returnPartialHypotheses
required method
If enabled the recognizer returns partial hypotheses (Hyoptheses, when the end of the utterance wasn’t detected)
@property (nonatomic) BOOL returnPartialHypotheses
Discussion
If enabled the recognizer returns partial hypotheses (Hyoptheses, when the end of the utterance wasn’t detected)
Declared In
NTSpeechRecognizer.h
– initWithAudioSource:
required method
Creates a new recognizer with a given audio source.
- (instancetype)initWithAudioSource:(NTAudioSource *)audioSource
Parameters
audioSource |
Audio Source |
---|
Return Value
instance
Discussion
Creates a new recognizer with a given audio source.
Declared In
NTSpeechRecognizer.h
– start
required method
Start the recognition process.
- (void)start
Discussion
Start the recognition process.
Declared In
NTSpeechRecognizer.h
– stop
required method
Stop the recognition process. Has no effect if the process wasn’t started.
- (void)stop
Discussion
Stop the recognition process. Has no effect if the process wasn’t started.
Declared In
NTSpeechRecognizer.h
– suspend
required method
Suspend the recognition process. Has no effect if the process wasn’t started.
- (void)suspend
Discussion
Suspend the recognition process. Has no effect if the process wasn’t started.
Declared In
NTSpeechRecognizer.h
– resume
required method
Resume the recognition process. Has no effect if the process wasn’t started or wasn’t suspended.
- (void)resume
Discussion
Resume the recognition process. Has no effect if the process wasn’t started or wasn’t suspended.
Declared In
NTSpeechRecognizer.h
– loadPronunciationDictioanry:
required method
Loads the given dictionary.
- (BOOL)loadPronunciationDictioanry:(NTPronunciationDictionary *)dictionary
Parameters
dictionary |
Dictionary |
---|
Return Value
YES on succes, NO on failure
Discussion
Loads the given dictionary.
Declared In
NTSpeechRecognizer.h
– addWord:phones:
required method
Add the phones for the given word. Existing phones for the same words won’t be deleted.
- (BOOL)addWord:(NSString *)word phones:(NSString *)phones
Parameters
word |
Word (e.g. “Flight”) |
---|---|
phones |
Phones (e.g. “F L AY T”) |
Return Value
YES on success
Discussion
Add the phones for the given word. Existing phones for the same words won’t be deleted.
@attention Use addWords:(NSDictionary*)words when adding multiple words. So the recognizer doesn’t has to update for every single word.
Declared In
NTSpeechRecognizer.h
– addWord:listOfPhones:
required method
Add multiple phones for the given word. Existing phones for the same words won’t be deleted.
- (BOOL)addWord:(NSString *)word listOfPhones:(NSArray *)listOfPhones
Parameters
word |
Word (e.g. “Flight”) |
---|---|
listOfPhones |
Array (e.g. [“F L AY T”, “F L EY T”]) |
Return Value
YES on success
Discussion
Add multiple phones for the given word. Existing phones for the same words won’t be deleted.
@attention Use addWords:(NSDictionary*)words when adding multiple words. So the recognizer doesn’t has to update for every single word.
Declared In
NTSpeechRecognizer.h
– addWords:
required method
Adds words and phones from dictionary.
- (BOOL)addWords:(NSDictionary *)words
Parameters
words |
---|
Return Value
YES on success
Discussion
Adds words and phones from dictionary.
NSDictionary Format:
@{ @“word” : @[ @“phone a”, @“phone b”, @“phone c”], @“word b” : @[ @“phone ba”, @“phone bb”,] }
Declared In
NTSpeechRecognizer.h
– addSearch:
required method
Adds the given search to the recognizer. If there already is a search with the given name it will be replaced.
- (BOOL)addSearch:(NTSpeechSearch *)search
Parameters
search |
Search |
---|
Return Value
YES on success, NO on failure
Discussion
Adds the given search to the recognizer. If there already is a search with the given name it will be replaced.
Declared In
NTSpeechRecognizer.h
– removeSearch:
required method
Removes the given search.
- (void)removeSearch:(NTSpeechSearch *)search
Parameters
search |
Search |
---|
Discussion
Removes the given search.
Declared In
NTSpeechRecognizer.h
– removeSearchByName:
required method
Removes the search with the given name if existing.
- (void)removeSearchByName:(NSString *)name
Parameters
name |
Name of the search. |
---|
Discussion
Removes the search with the given name if existing.
Declared In
NTSpeechRecognizer.h
– setActiveSearchByName:
required method
Activates the search with the given name if existing.
- (BOOL)setActiveSearchByName:(NSString *)name
Parameters
name |
Name of the search. |
---|
Return Value
YES if a search is existing with given name, otherwise NO.
Discussion
Activates the search with the given name if existing.
Declared In
NTSpeechRecognizer.h
– searchWithName:
required method
Get the search with the given name, if existing.
- (NTSpeechSearch *)searchWithName:(NSString *)name
Parameters
name |
Name to search for. |
---|
Return Value
Search if existing, otherwise nil.
Discussion
Get the search with the given name, if existing.
Declared In
NTSpeechRecognizer.h
– addDelegate:
required method
Adds a delegate
- (void)addDelegate:(id<NTSpeechRecognizerDelegate>)delegate
Parameters
delegate |
delegate |
---|
Discussion
Adds a delegate
Declared In
NTSpeechRecognizer.h
– removeDelegate:
required method
Removes a delegate
- (void)removeDelegate:(id<NTSpeechRecognizerDelegate>)delegate
Parameters
delegate |
delegate |
---|
Discussion
Removes a delegate
Declared In
NTSpeechRecognizer.h