9#ifndef KIOSRecognizer_h
10#define KIOSRecognizer_h
18typedef NS_ENUM(NSInteger, KIOSRecognizerType) {
20 KIOSRecognizerTypeUnknown = -1,
22 KIOSRecognizerTypeGMM,
24 KIOSRecognizerTypeNNet,
26 KIOSRecognizerTypeNNet3,
28 KIOSRecognizerTypeNNet3Chain
33typedef NS_ENUM(NSInteger, KIOSRecognizerLogLevel) {
35 KIOSRecognizerLogLevelDebug=0,
37 KIOSRecognizerLogLevelInfo,
39 KIOSRecognizerLogLevelWarning,
43typedef NS_ENUM(NSInteger, KIOSRecognizerState) {
46 KIOSRecognizerStateNeedsDecodingGraph=0,
48 KIOSRecognizerStateReadyToListen,
50 KIOSRecognizerStateListening,
56 KIOSRecognizerStateFinalProcessing,
76typedef NS_ENUM(NSInteger, KIOSVadParameter) {
79 KIOSVadTimeoutForNoSpeech=0,
83 KIOSVadTimeoutEndSilenceForGoodMatch,
87 KIOSVadTimeoutEndSilenceForAnyMatch,
92 KIOSVadTimeoutMaxDuration
106@property(nonatomic, readonly, nonnull) NSString *
text;
109@property(nonatomic, readonly, nonnull) NSString *
cleanText;
112@property(nonatomic, strong, readonly, nullable) NSArray<KIOSWord *> *
words;
114@property(nonatomic, readonly, nullable) NSNumber *confidence DEPRECATED_MSG_ATTRIBUTE(
"Deprecated");
117- (nonnull NSString *)description;
142- (nullable NSDictionary *)toDictionary;
156@property (nonatomic, readonly, nonnull) NSString *
text;
159@property (nonatomic, strong, nullable, readonly) NSNumber *
startTime;
162@property (nonatomic, strong, nullable, readonly) NSNumber *
duration;
164@property (nonatomic, strong, nullable, readonly) NSNumber *confidence
165__deprecated_msg(
"Deprecated. Result will most likely contain <SPOKEN_NOISE> word");
168@property(nonatomic, strong, nullable) NSArray<KIOSPhone *> *
phones;
172@property (nonatomic, assign, readonly, getter=isTag) BOOL tag
175- (nonnull NSString *)description;
186@property (nonatomic, readonly, nonnull) NSString *text;
188@property (nonatomic, strong, nullable, readonly) NSNumber *startTime;
190@property (nonatomic, strong, nullable, readonly) NSNumber *duration;
192@property (nonatomic, strong, nullable, readonly) NSNumber *pronunciationScore;
209@protocol KIOSRecognizerDelegate <NSObject>
237- (void)recognizerTriggerPhraseDetectedForRecognizer:(nonnull
KIOSRecognizer *)recognizer
238__deprecated_msg("Please see triggerPhraseDetected");
279- (void)recognizerReadyToListenAfterInterrupt:(nonnull
KIOSRecognizer *)recognizer;
360@property(nonatomic, weak, nullable) id<KIOSRecognizerDelegate>
delegate;
437+ (BOOL)initWithASRBundle:(nonnull NSString *)bundleName;
457+ (BOOL)initWithASRBundleAtPath:(nonnull NSString *)pathToASRBundle;
462+ (nullable instancetype) new __attribute__((unavailable("new not available, call
sharedInstance instead")));
495- (void) setVadGating:(BOOL)value;
514- (BOOL)prepareForListeningWithDecodingGraphWithName:(nonnull NSString *)dgName
515 withGoPComputation:(BOOL)computeGoP;
538- (BOOL)prepareForListeningWithDecodingGraphAtPath:(nonnull NSString *)pathToDecodingGraphDirectory
539 withGoPComputation:(BOOL)computeGoP;
561- (BOOL)prepareForListeningWithContextualDecodingGraphWithName:(nonnull NSString *)dgName
562 andContextId:(nonnull NSNumber *) contextId
563 withGoPComputation:(BOOL)computeGoP;
588- (BOOL)prepareForListeningWithContextualDecodingGraphAtPath:(nonnull NSString *)dgPath
589 andContextId:(nonnull NSNumber *)contextId
590 withGoPComputation:(BOOL)computeGoP;
640- (BOOL)startListening:(NSString *_Nullable*_Nullable) responseId;
682- (void)adaptToSpeakerWithName:(nonnull NSString *)speakerName;
741+ (BOOL)removeSpeakerAdaptationProfiles:(nonnull NSString *)speakerName;
809- (BOOL)performEchoCancellation:(BOOL)value;
818- (void)setBluetoothA2DPOutput:(BOOL)value;
872- (void)setVADParameter:(KIOSVadParameter)parameter toValue:(
float)value;
889+ (void)setLogLevel:(KIOSRecognizerLogLevel)logLevel;
895@property(nonatomic, readonly, nullable) NSString *lastRecordingFilename
896__deprecated_msg(
"Please see KIOSResponse for more details");
898@property(nonatomic, readonly, nullable) NSString *lastJSONMetadataFilename
899__deprecated_msg(
"Please see KIOSResponse for more details");
901- (BOOL)prepareForListeningWithCustomDecodingGraphWithName:(nonnull NSString *)dgName
902__deprecated_msg("Please use prepareForListeningWithDecodingGraphWithName");
904- (BOOL)prepareForListeningWithCustomDecodingGraphAtPath:(nonnull NSString *)pathToDecodingGraphDirectory
905__deprecated_msg("Please use prepareForListeningWithDecodingGraphAtPath");
907- (BOOL)startListeningFromAudioFile:(nonnull NSString *)pathToAudioFile
908__deprecated_msg("Temporarily deprecated; methods to feed audio directly to the recognizer will be provided in the future");
916- (void)enableBluetoothOutput:(BOOL)value __attribute__((deprecated("use setBluetoothA2DPOutput instead")));
918- (void)enableBluetoothA2DPOutput:(BOOL)value __attribute__((deprecated("use setBluetoothA2DPOutput instead")));
Definition KIOSRecognizer.h:186
Definition KIOSRecognizer.h:347
NSString * miscDataDirectory
Definition KIOSRecognizer.h:382
BOOL handleNotifications
Definition KIOSRecognizer.h:774
BOOL removeAllSpeakerAdaptationProfiles()
BOOL deactivateAudioStack()
BOOL echoCancellationAvailable()
nonnull NSString * version()
KIOSRecognizerState recognizerState
Definition KIOSRecognizer.h:364
void resetSpeakerAdaptation()
nullable KIOSRecognizer * sharedInstance()
NSString * asrBundleName
Definition KIOSRecognizer.h:373
NSString * recordingsDir
Definition KIOSRecognizer.h:379
NSString * asrBundlePath
Definition KIOSRecognizer.h:368
BOOL activateAudioStack()
BOOL rescore
Definition KIOSRecognizer.h:401
void saveSpeakerAdaptationProfile()
NSString * currentDecodingGraphName
Definition KIOSRecognizer.h:376
id< KIOSRecognizerDelegate > delegate
Definition KIOSRecognizer.h:360
Definition KIOSResponse.h:19
Definition KIOSRecognizer.h:104
nullable NSString * toJSON()
NSString * cleanText
Definition KIOSRecognizer.h:109
NSString * text
Definition KIOSRecognizer.h:106
NSArray< KIOSWord * > * words
Definition KIOSRecognizer.h:112
Definition KIOSRecognizer.h:155
NSString * text
Definition KIOSRecognizer.h:156
BOOL tag __deprecated_msg("Temporarily deprecated")
NSNumber * duration
Definition KIOSRecognizer.h:162
NSNumber * startTime
Definition KIOSRecognizer.h:159
NSArray< KIOSPhone * > * phones
Definition KIOSRecognizer.h:168
void unwindAppAudioBeforeAudioInterrupt()