AWSLexAudioSession Class Reference

Inherits from NSObject
Declared in AWSLexInteractionKit.h
AWSLexInteractionKit.m

Overview

Wrapper to AVAudioSession class. It auto-detects output source(Internal speaker or microphone) at runtime by listening to AVAudioSessionRouteChangeNotification.

– setPlayAndRecordCategory:

Set AVAudioSession category to AVAudioSessionCategoryPlayAndRecord

- (void)setPlayAndRecordCategory:(NSError **)outError

Declared In

AWSLexInteractionKit.h

– overrideOutputAudioPort:

Override output audio port to AVAudioSessionPortOverrideSpeaker if headset is not detected.

- (void)overrideOutputAudioPort:(NSError **)outError

Declared In

AWSLexInteractionKit.h

– requestRecordPermission:

Request record permission to AVAudioSession.

- (void)requestRecordPermission:(PermissionBlock)response

Declared In

AWSLexInteractionKit.h

– startObservingAudioSessionRouteChangeNotification

Start observing for AVAudioSessionRouteChangeNotification if not already started.

- (void)startObservingAudioSessionRouteChangeNotification

Declared In

AWSLexInteractionKit.h

– endObservingAudioSessionRouteChangeNotification

Remove observing for AVAudioSessionRouteChangeNotification.

- (void)endObservingAudioSessionRouteChangeNotification

Declared In

AWSLexInteractionKit.h