AWSLexInteractionKitConfig

Objective-C

@interface AWSLexInteractionKitConfig : NSObject<NSCopying>

/*
 * The bot name.
 */
@property (nonatomic, strong) NSString *botName;

/*
 * The bot alias.
 */
@property (nonatomic, strong) NSString *botAlias;

/*
 * Optional user id, The service will use cognito identity id by default.
 */
@property (nonatomic, strong, nullable) NSString *userId;

/*
 * Global session attributes are attributes that are applied for every call made to the lex service.
 */
@property (nonatomic, readonly) NSDictionary<NSString *, NSString *> *globalSessionAttributes;

/*
 * The time interval before which the microphone timesout.
 */
@property (nonatomic, assign) NSTimeInterval noSpeechTimeoutInterval;

/*
 * The max time interval for a speech input.
 */
@property (nonatomic, assign) NSTimeInterval maxSpeechTimeoutInterval;

/*
 * The number of speech frames which defines what is a active speech.
 */
@property (nonatomic, assign) NSUInteger startpointingThreshold;

/*
 * The number of non-speech frames which defines what a silence is.
 */
@property (nonatomic, assign) NSUInteger endpointingThreshold;

/*
 * The Likelyhood-ratio test threshold value, which will be used to classify whether a frame of audio is a speech or not.
 */
@property (nonatomic, assign) float      lrtThreshold;

/*
 * Automatically start playing when a speech response is recieved. Defaults to true.
 */
@property (nonatomic, assign) BOOL       autoPlayback;

/*
 * Speech encoding format. Defaults to Opus.
 */
@property (nonatomic, assign) AWSLexSpeechEncoding encoding;

/*
 * Set sessionAttribute globally.
 */
-(void)setGlobalSessionAttribute:(NSString *)value forKey:(NSString *)key;

/*
 * remove a global session attribute
 */
-(void)removeGlobalSessionAttribute:(NSString *)key;

/*
 * Clear all global session attributes.
 */
-(void)clearAllGlobalSessionAttributes;

/*
 * returns interaction config with default values.
 */
+(instancetype)defaultInteractionKitConfigWithBotName:(NSString *)botName
                                             botAlias:(NSString *)botAlias;

@end

Swift

class AWSLexInteractionKitConfig : NSObject, NSCopying

Undocumented

  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *botName

    Swift

    var botName: String { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *botAlias

    Swift

    var botAlias: String { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *userId

    Swift

    var userId: String? { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSDictionary<NSString *, NSString *> *globalSessionAttributes

    Swift

    var globalSessionAttributes: [String : String] { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) NSTimeInterval noSpeechTimeoutInterval

    Swift

    var noSpeechTimeoutInterval: TimeInterval { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) NSTimeInterval maxSpeechTimeoutInterval

    Swift

    var maxSpeechTimeoutInterval: TimeInterval { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger startpointingThreshold

    Swift

    var startpointingThreshold: UInt { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger endpointingThreshold

    Swift

    var endpointingThreshold: UInt { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) float lrtThreshold

    Swift

    var lrtThreshold: Float { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) BOOL autoPlayback

    Swift

    var autoPlayback: Bool { get set }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic) AWSLexSpeechEncoding encoding

    Swift

    var encoding: AWSLexSpeechEncoding { get set }
  • Undocumented

    Declaration

    Objective-C

    -(void)setGlobalSessionAttribute:(NSString *)value forKey:(NSString *)key;

    Swift

    func setGlobalSessionAttribute(_ value: String, forKey key: String)
  • Undocumented

    Declaration

    Objective-C

    -(void)removeGlobalSessionAttribute:(NSString *)key;

    Swift

    func removeGlobalSessionAttribute(_ key: String)
  • Undocumented

    Declaration

    Objective-C

    -(void)clearAllGlobalSessionAttributes;

    Swift

    func clearAllGlobalSessionAttributes()
  • Undocumented

    Declaration

    Objective-C

    +(instancetype)defaultInteractionKitConfigWithBotName:(NSString *)botName
                                                 botAlias:(NSString *)botAlias;

    Swift

    class func defaultInteractionKitConfig(withBotName botName: String, botAlias: String) -> Self