### Start Recording Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Initiates the recording of the user's audio and video for service processing. ```swift public func startRecording() ``` -------------------------------- ### recordingStarted Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html User has started a recording successfully. ```APIDOC ## recordingStarted ### Description User has started a recording successfully. ``` -------------------------------- ### Cocoapods Installation of DigitalHumanSDK Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md Add this line to your Podfile to install the DigitalHumanSDK via Cocoapods, linking directly to the git repository. Run 'pod install' afterwards. ```ruby pod 'DigitalHumanSDK', :git => 'https://gitlab.com/uneeq-oss/ios-sdk.git' ``` -------------------------------- ### Start a Digital Human Session Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Initializes a session with the Digital Human service. Requires audio and camera permissions to be enabled by the user. ```Swift public func startSession(sessionId: String) ``` -------------------------------- ### Get Local Video Preview View Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Retrieves the UIView displaying the local camera preview. Returns nil if the session has not started or connected successfully. ```Swift public func getLocalVideoPreviewView(frame: CGRect) -> UIView? ``` -------------------------------- ### getLocalVideoPreviewView Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Provides the app with the view displaying the local preview video from the selected camera on the device, once the session has successfully started and connected. Returns nil if no session has started. ```APIDOC ## getLocalVideoPreviewView ### Description Provides the app with the view displaying the local preview video from the selected camera on the device, once the session has successfully started and connected. Returns nil if no session started. ### Method `public func getLocalVideoPreviewView(frame: CGRect) -> UIView?` ### Parameters #### Path Parameters * **frame** (CGRect) - Required - The frame for the preview view. ``` -------------------------------- ### connected Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Connection to the service started. ```APIDOC ## connected ### Description Connection to the service started. ``` -------------------------------- ### Start Recording Voice Input Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md Initiates voice recording for the user to speak to the Digital Human. Call this method when the user intends to speak. ```swift digitalHumanSDK.startRecording() ``` -------------------------------- ### Get Available Audio Outputs Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Retrieves a list of all available audio output devices for the session. Use this to allow users to select their preferred output. ```swift public func getAudioOutputs() -> [AVAudioSessionPortDescription] ``` -------------------------------- ### Get Available Camera Positions Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Requests the available camera positions for recording and local preview. ```swift public func getCameraPositionsAvailable() -> [AVCaptureDevice.Position] ``` -------------------------------- ### Get Available Microphone Inputs Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Retrieves a list of all available microphone input devices for the session. Use this to present options to the user. ```swift public func getMicInputsAvailable() -> [AVAudioSessionPortDescription] ``` -------------------------------- ### getMicActivityView Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Provides the app with the view displaying the local preview video from the selected camera on the device, once the session has successfully started and connected. Returns nil if unable to create the activity view. Allows customization of levels, spacing, base color, and fill color. ```APIDOC ## getMicActivityView ### Description Provides the app with the view displaying the local preview video from the selected camera on the device, once the session has successfully started and connected. Returns nil if unable to create activity view. ### Method `public func getMicActivityView(frame: CGRect, levels: Int = 5, spacing: CGFloat = 8, baseColor: UIColor = .gray, fillColor: UIColor = .green) -> UIView?` ### Parameters #### Path Parameters * **frame** (CGRect) - Required - The frame for the activity view. * **levels** (Int) - Optional - Defaults to 5 bands. * **spacing** (CGFloat) - Optional - Defaults to 8. This provides the spacing used between each level banding. * **baseColor** (UIColor) - Optional - Defaults to system UIColor.gray. * **fillColor** (UIColor) - Optional - Defaults to system UIColor.green. ``` -------------------------------- ### getRemoteVideoView Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Provides the app with the view displaying the remote video from the session, once the session has successfully started and connected. Returns nil if no session has started. ```APIDOC ## getRemoteVideoView ### Description Provides the app with the view displaying the remote video from the session, once the session has successfully started and connected. Returns nil if no session started. ### Method `public func getRemoteVideoView(frame: CGRect) -> UIView?` ### Parameters #### Path Parameters * **frame** (CGRect) - Required - The frame for the video view. ``` -------------------------------- ### Get Remote Video View Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Retrieves the UIView displaying the remote video feed. Returns nil if the session has not started or connected successfully. ```Swift public func getRemoteVideoView(frame: CGRect) -> UIView? ``` -------------------------------- ### Get Microphone Activity View Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Provides a view that visualizes microphone activity. Customizable with parameters for levels, spacing, base color, and fill color. ```Swift public func getMicActivityView(frame: CGRect, levels: Int = 5, spacing: CGFloat = 8, baseColor: UIColor = .gray, fillColor: UIColor = .green) -> UIView? ``` -------------------------------- ### Get Current Audio Output Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Requests the currently selected audio output device. Use this to determine where audio is currently being played. ```swift public func getCurrentAudioOutput() -> AVAudioSessionPortDescription? ``` -------------------------------- ### Get Current Microphone Input Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Requests the currently selected microphone input device. Use this to check which microphone is active. ```swift public func getCurrentMicInput() -> AVAudioSessionPortDescription? ``` -------------------------------- ### startSession Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Initializes the session. The sessionReady and sessionLive messages will be sent to the state delegate when the session is ready and fully connected, respectively. Appropriate error messages will be sent if the session fails (e.g., avatarUnavailable). Requires audio and camera permissions to be granted by the user. ```APIDOC ## startSession ### Description Initialises the session. The sessionReady message will be sent to the state delegate when the session is ready, and sessionLive when the feed is fully connected, or an appropriate error message (e.g., avatarUnavailable). Requires the application to have requested, and the user to have enabled, audio and camera permissions, otherwise appropriate error messages will be returned. ### Method `public func startSession(sessionId: String)` ### Parameters #### Path Parameters * **sessionId** (String) - Required - The unique ID for the call, provided by the app. ``` -------------------------------- ### DigitalHumanSDK Initialization Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Instantiate the DigitalHumanSDK with either DHOptions or DHTokenOptions for configuration. ```APIDOC ## Initialization ### `init(options: DHOptions)` Initializes the DigitalHumanSDK with the provided options. #### Parameters * `options` (DHOptions) - Options struct for configuration of the Digital Humans session. ### `init(tokenOptions: DHTokenOptions)` Initializes the DigitalHumanSDK with the provided token options. #### Parameters * `tokenOptions` (DHTokenOptions) - Token options struct for configuration of the Digital Humans session. ``` -------------------------------- ### sessionReady Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Service is ready to be used. ```APIDOC ## sessionReady ### Description Service is ready to be used. ``` -------------------------------- ### Configure Camera Settings Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Manage camera settings for recording and local preview. ```APIDOC ## getCameraPositionsAvailable ### Description Request the camera positions available for recording the user and local preview. ### Method `getCameraPositionsAvailable()` ### Parameters None ### Return Value An array of available camera positions. ``` ```APIDOC ## setCamera ### Description Sets the camera position for recording the user and local preview. ### Method `setCamera(_:)` ### Parameters * **position** (AVCaptureDevice.Position) - The desired camera position. ``` ```APIDOC ## flipCameraPreview ### Description Swaps between front/back camera positions for recording the user. ### Method `flipCameraPreview()` ### Parameters None ### Response None ``` -------------------------------- ### sessionLive Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Session is Live, avatar video is active. ```APIDOC ## sessionLive ### Description Session is Live, avatar video is active. ``` -------------------------------- ### Initializing SDK with Client Secret Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md Initialize the DigitalHumanSDK using a DHOptions struct containing your workspace ID, client secret, and region URL. ```swift let options = DHOptions(workspaceId: "AWORKSPACEID", clientSecret: "ACLIENTSECRET", url: "AREGIONURL") let digitalHumanSDK = DigitalHumanSDK(options: options) ``` -------------------------------- ### DHOptions Initializer Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Structs/DHOptions.html Initializes DHOptions with essential parameters for configuring a DigitalHumanSDK session. Optional parameters allow for custom data, controlling local video transmission, and enabling Voice-Activity-Detection. ```swift public init(workspaceId: String, clientSecret: String, url: String, customData: [String: String]? = nil, sendLocalVideo: Bool = true, vadEnabled: Bool = false) ``` -------------------------------- ### DHOptions Initializer Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Structs/DHOptions.html Initializes DHOptions with essential configuration parameters for a DigitalHumanSDK session. This includes your workspace ID, client secret, the API URL, and optional parameters for custom data, local video transmission, and voice-activity detection. ```APIDOC ## DHOptions Initializer ### Description Initializes DHOptions with essential configuration parameters for a DigitalHumanSDK session. This includes your workspace ID, client secret, the API URL, and optional parameters for custom data, local video transmission, and voice-activity detection. ### Method Initializer ### Parameters #### Path Parameters - **workspaceId** (String) - Required - Your Digital Humans service Workspace ID - **clientSecret** (String) - Required - Your Digital Humans service client secret - **url** (String) - Required - The base digital humans API URL - **customData** (Optional<[String: String]>) - Optional, custom payload for submitting with session request - **sendLocalVideo** (Optional) - Optional, false disables camera access or camera accessing calls. Defaults to true. - **vadEnabled** (Optional) - Optional, true enables Voice-Activity-Detection, false leaves Voice-Activity-Detection disabled. Defaults to false. ``` -------------------------------- ### Resume Session Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Resumes the current session, enabling local video and audio transmission and rendering. ```swift public func resumeSession() ``` -------------------------------- ### Initializing SDK with Token ID Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md Initialize the DigitalHumanSDK using a DHTokenOptions struct containing your workspace ID, a single-use token ID, and region URL. ```swift let options = DHTokenOptions(workspaceId: "AWORKSPACEID", tokenId: "ASINGLEUSETOKEN", url: "AREGIONURL") let digitalHumanSDK = DigitalHumanSDK(tokenOptions: options) ``` -------------------------------- ### DHTokenOptions Initializer Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Structs/DHTokenOptions.html Initializes DHTokenOptions with essential parameters for configuring a DigitalHumanSDK session. This includes your workspace ID, a single-use token, the API URL, and optional settings for custom data, local video transmission, and voice activity detection. ```APIDOC ## DHTokenOptions Initializer ### Description Initializes DHTokenOptions with essential parameters for configuring a DigitalHumanSDK session. This includes your workspace ID, a single-use token, the API URL, and optional settings for custom data, local video transmission, and voice activity detection. ### Method `init` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **workspaceId** (String) - Required - Your Digital Humans service Workspace ID - **tokenId** (String) - Required - Your single use token for initialising the service - **url** (String) - Required - The base digital humans API URL - **customData** ([String: String]?) - Optional - Optional, custom payload for submitting with session request - **sendLocalVideo** (Bool) - Optional - Optional, false disables camera access or camera accessing calls. Defaults to true. - **vadEnabled** (Bool) - Optional - Optional, true enabled enables Voice-Activity-Detection, false is Push-To-Talk. Default is PTT. ``` -------------------------------- ### Microphone Configuration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Methods for retrieving and setting the current and available microphone inputs. ```APIDOC ## getCurrentMicInput ### Description Request the current microphone input. ### Method Swift Function ### Parameters None ### Return Value The `AVAudioSessionPortDescription` of the current microphone selected for the session. ### Declaration ```swift public func getCurrentMicInput() -> AVAudioSessionPortDescription? ``` ``` ```APIDOC ## getMicInputsAvailable ### Description Request the microphone inputs available. ### Method Swift Function ### Parameters None ### Return Value An array of `AVAudioSessionPortDescription` objects representing the microphones available for the session. ### Declaration ```swift public func getMicInputsAvailable() -> [AVAudioSessionPortDescription] ``` ``` ```APIDOC ## setMicInput ### Description Set the microphone input in use by the session. Returns a success or failure message to the message delegate. ### Method Swift Function ### Parameters * **input** (`AVAudioSessionPortDescription`) - The input of the microphone to set. ### Return Value Returns a `deviceSetMicSuccess` message upon success to the messageDelegate, or a `deviceAudioInputDeviceNotFound` message on failure. ### Declaration ```swift public func setMicInput(_ input: AVAudioSessionPortDescription) ``` ``` -------------------------------- ### DHTokenOptions Initializer Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Structs/DHTokenOptions.html Use this initializer to configure all options for a DigitalHumanSDK session with a tokenId. It requires your workspace ID, a single-use token, and the base digital humans API URL. Optional parameters include custom data, a flag to disable local video, and a flag to enable Voice-Activity-Detection. ```swift public init(workspaceId: String, tokenId: String, url: String, customData: [String: String]? = nil, sendLocalVideo: Bool = true, vadEnabled: Bool = false) ``` -------------------------------- ### Speaker Configuration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Methods for retrieving and setting the current and available audio outputs. ```APIDOC ## getCurrentAudioOutput ### Description Request the current audio output. ### Method Swift Function ### Parameters None ### Return Value The `AVAudioSessionPortDescription` of the current audio output selected for the session. ### Declaration ```swift public func getCurrentAudioOutput() -> AVAudioSessionPortDescription? ``` ``` ```APIDOC ## getAudioOutputs ### Description Request the audio outputs available. ### Method Swift Function ### Parameters None ### Return Value An array of `AVAudioSessionPortDescription` objects representing the audio outputs available for the session. ### Declaration ```swift public func getAudioOutputs() -> [AVAudioSessionPortDescription] ``` ``` ```APIDOC ## setAudioOutput ### Description Set a preferred audio output to use in a live session. Returns a success or failure message to the message delegate. ### Method Swift Function ### Parameters * **output** (`AVAudioSessionPortDescription`) - The output port description to be set. ### Return Value Returns a `setAudioOutputSuccess` message upon success to the messageDelegate, or a `setAudioOutputFailure` message on failure. ### Declaration ```swift public func setAudioOutput(_ output: AVAudioSessionPortDescription) ``` ``` -------------------------------- ### Flip Camera Preview Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Swaps between front and back camera positions for recording. ```swift public func flipCameraPreview() ``` -------------------------------- ### Importing the DigitalHumanSDK Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md Import the DigitalHumanSDK into your Swift code to begin using its functionalities. ```swift import DigitalHumanSDK ``` -------------------------------- ### Enable Speaker Output Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Enables audio output from the current Digital Human session. ```Swift public func speakerOn() ``` -------------------------------- ### Call Welcome Message Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Requests a welcome message from the Digital Human. This function will not execute if the session is paused. ```swift public func callWelcome() ``` -------------------------------- ### Requesting Camera and Microphone Permissions Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md This Swift function checks and requests microphone and camera permissions. Ensure these permissions are granted before initiating a Digital Human chat session. ```swift func checkPermissions() { // Microphone permission if AVAudioSession.sharedInstance().recordPermission == .undetermined { // Request permission AVAudioSession.sharedInstance().requestRecordPermission({ (granted) in // Handle granted }) } // Camera permission if AVCaptureDevice.authorizationStatus(for: .video) == .notDetermined { AVCaptureDevice.requestAccess(for: .video, completionHandler: {accessGranted in // Handle granted }) } } ``` -------------------------------- ### permissionErrorMicrophone Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html User has not granted permission to access their microphone. ```APIDOC ## permissionErrorMicrophone ### Description User has not granted permission to access their microphone. ``` -------------------------------- ### DigitalHumanSDK Class Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes.html This is the core SDK object. Instantiate it with a DHOptions struct and configure your app as a delegate for status and speech text messages. ```swift public class DigitalHumanSDK : NSObject ``` -------------------------------- ### Set Camera Position Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Sets the camera position for recording and local preview. ```swift public func setCamera(_ position: AVCaptureDevice.Position) ``` -------------------------------- ### DigitalHumanSDK Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes.html The core SDK object. Instantiate this object with a DHOptions struct, and configure your app as delegate for status messages and avatar speech text messages. ```APIDOC ## Class: DigitalHumanSDK ### Description The core SDK object. Instantiate this object with a DHOptions struct, and configure your app as delegate for status messages and avatar speech text messages. ### Declaration Swift ```swift public class DigitalHumanSDK : NSObject ``` ``` -------------------------------- ### Recording Functions Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Control the recording of user's audio and video for processing. ```APIDOC ## startRecording ### Description Tells the service to start recording the user’s audio/video for processing response. ### Method `startRecording()` ### Parameters None ### Response None ``` ```APIDOC ## stopRecording ### Description Tells the service to finish recording the user’s audio/video for processing response. ### Method `stopRecording()` ### Parameters None ### Response None ``` -------------------------------- ### recordingError Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html An error has occurred with recording. ```APIDOC ## recordingError ### Description An error has occurred with recording. ``` -------------------------------- ### setAudioOutputSuccess Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Returned when a call to set the audio output has been set successfully. ```APIDOC ## setAudioOutputSuccess ### Description Returned when a call to set the audio output has been set successfully. ### Parameters #### Path Parameters - **output** (AVAudioSessionPortDescription) - Description: The audio output device that has been successfully set. ``` -------------------------------- ### Handle Digital Human SDK Messages Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md This function handles messages from the Digital Human SDK, specifically for setting up remote and local video views when the session is ready, and cleaning them up when the session ends. Ensure the necessary UI elements (remoteView, localView) are properly configured. ```swift func digitalHumanMessage(_ message: DHMessage) { print("digitalHumanMessage received: \(message)") switch message { case .sessionReady: // Get the remote video view for the Digital Human from the SDK if let view = self.digitalHumanSDK.getRemoteVideoView(frame: self.remoteView.frame) { self.remoteView.addSubview(view) view.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ view.leadingAnchor.constraint(equalTo: self.remoteView.leadingAnchor), view.trailingAnchor.constraint(equalTo: self.remoteView.trailingAnchor), view.topAnchor.constraint(equalTo: self.remoteView.topAnchor), view.bottomAnchor.constraint(equalTo: self.remoteView.bottomAnchor) ]) } // Get the local video view for the Digital Human from the SDK if let view = self.digitalHumanSDK.getLocalVideoPreviewView(frame: self.localView.frame) { self.localView.addSubview(view) view.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ view.leadingAnchor.constraint(equalTo: self.localView.leadingAnchor), view.trailingAnchor.constraint(equalTo: self.localView.trailingAnchor), view.topAnchor.constraint(equalTo: self.localView.topAnchor), view.bottomAnchor.constraint(equalTo: self.localView.bottomAnchor) ]) } case .sessionEnded: for subview in self.remoteView.subviews { subview.removeFromSuperview() } for subview in self.localView.subviews { subview.removeFromSuperview() } default: break } } ``` -------------------------------- ### DHRTCConfig answerFirst Case Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHRTCConfig.html Represents the answerFirst configuration for DHRTCConfig. This option is currently undocumented. ```swift case answerFirst ``` -------------------------------- ### deviceAudioInputDeviceNotFound Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Returned when a call to set the microphone input cannot find that microphone input. ```APIDOC ## deviceAudioInputDeviceNotFound ### Description Returned when a call to set the microphone input cannot find that microphone input. ### Parameters #### Path Parameters - **input** (AVAudioSessionPortDescription) - Description: The desired audio input device that was not found. ``` -------------------------------- ### recordingStopped Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html User has stopped a recording successfully. ```APIDOC ## recordingStopped ### Description User has stopped a recording successfully. ``` -------------------------------- ### connectionLost Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Connection to the service is lost. ```APIDOC ## connectionLost ### Description Connection to the service is lost. ``` -------------------------------- ### Pause/Resume Session Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Control the active session by pausing or resuming it. Pausing stops local media transmission and rendering, while resuming restores it. ```APIDOC ## pauseSession ### Description Pauses the current session. Local video is no longer sent to the service, nor audio input. Remote video is not rendered in the remote video view, local video is paused in the local video view. ### Method `pauseSession()` ### Parameters None ### Response None ``` ```APIDOC ## resumeSession ### Description Resumes the current session. Local video is sent to the service, along with audio input. Remote video resumes rendering in the remote video view. ### Method `resumeSession()` ### Parameters None ### Response None ``` ```APIDOC ## endSession ### Description Disconnects the active session, if connected. Returns a sessionEnded message to the messageDelegate. ### Method `endSession()` ### Parameters None ### Response None ``` -------------------------------- ### Set Audio Output Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Sets a preferred audio output device for the session. This function returns a success or failure message via the messageDelegate. ```swift public func setAudioOutput(_ output: AVAudioSessionPortDescription) ``` -------------------------------- ### speakerOn Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Enables audio output from the current Digital Human session. ```APIDOC ## speakerOn ### Description Enables audio output from the current Digital Human session. ### Method `public func speakerOn()` ``` -------------------------------- ### DigitalHumanSDK Public Methods Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Provides methods for interacting with the DigitalHumanSDK, such as retrieving session information. ```APIDOC ## Public Methods ### `getSessionId()` -> String? Returns the sessionId of the current active session. #### Declaration ```swift public func getSessionId() -> String? ``` ``` -------------------------------- ### sessionResumed Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Session has been resumed successfully. ```APIDOC ## sessionResumed ### Description Session has been resumed successfully. ``` -------------------------------- ### permissionErrorCamera Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html User has not granted permission to access their camera. ```APIDOC ## permissionErrorCamera ### Description User has not granted permission to access their camera. ``` -------------------------------- ### warning Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html General Warning Message - refer to msg. ```APIDOC ## warning ### Description General Warning Message - refer to msg. ### Parameters #### Path Parameters - **msg** (String) - Description: The warning message content. ``` -------------------------------- ### micActivity Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Sent upon activity of the user's microphone. The level ranges from 0.0 to 1.0, representing 0% to 100% activity. ```APIDOC ## micActivity ### Description Message is sent upon activity of the user microphone, level ranges from 0.0 - 1.0 (0% to 100%). ### Declaration ```swift case micActivity(level: Float) ``` ``` -------------------------------- ### unmuteAudio Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Enables audio input to the current Digital Human session. ```APIDOC ## unmuteAudio ### Description Enables audio input to the current Digital Human session. ### Method `public func unmuteAudio()` ``` -------------------------------- ### setAudioOutputFailure Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Returned when a call to set the audio output has failed. ```APIDOC ## setAudioOutputFailure ### Description Returned when a call to set the audio output has failed. ### Parameters #### Path Parameters - **output** (AVAudioSessionPortDescription) - Description: The audio output device that failed to be set. ``` -------------------------------- ### sessionEnded Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Session has been ended successfully. ```APIDOC ## sessionEnded ### Description Session has been ended successfully. ``` -------------------------------- ### DHOptions Structure Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Structs.html Declaration of the DHOptions structure, used for configuring a DigitalHumanSDK session with a client secret. ```swift public struct DHOptions ``` -------------------------------- ### webRTC Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html A WebRTC connectivity message intended for debugging purposes. ```APIDOC ## webRTC ### Description WebRTC connectivity message for debugging ### Declaration ```swift case webRTC(message: String) ``` ``` -------------------------------- ### sessionError Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Session Error has occurred. ```APIDOC ## sessionError ### Description Session Error has occurred. ### Parameters #### Path Parameters - **error** (DHError) - Description: The error that occurred during the session. ``` -------------------------------- ### DHTextDelegate Protocol Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Protocols.html Delegate protocol for receiving chat text back from the SDK, when interacting with the Digital Human. ```APIDOC ## DHTextDelegate Protocol ### Description Delegate protocol for receiving chat text back from the SDK, when interacting with the Digital Human. ### Declaration ```swift public protocol DHTextDelegate : AnyObject ``` ``` -------------------------------- ### DigitalHumanSDK Public Properties Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Access and configure various aspects of the DigitalHumanSDK, including connection status, version, delegates, and logging. ```APIDOC ## Public Properties ### `debugRetryEnabled` (Bool) Debugging mechanism for testing WebRTC sessions. Not intended for general use. ### `connected` (Bool) Indicates the connection status to the service. ### `version` (String) Reports the SDK version and build number. ### `avatarDelegate` (DHTextDelegate?) Applications can set themselves as this delegate to receive avatar text messages back from the SDK. ### `messageDelegate` (DHMessageDelegate?) Applications can set themselves as this delegate to receive status messages back from the SDK object. ### `loggingLevel` (DHLoggingLevel) The current logging level used by the SDK. ### `currentCamera` (AVCaptureDevice.Position?) Returns the current camera position being used by the session, if the session has started successfully (nil if not). ### `onlineStatus` (Bool) Indicates if we have online connectivity or not. ### `micActivityMessages` (Bool) Defines whether you want to receive mic activity messages or not, defaults to false. ``` -------------------------------- ### sessionPaused Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Session has been paused successfully. ```APIDOC ## sessionPaused ### Description Session has been paused successfully. ``` -------------------------------- ### Pause Session Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Pauses the current session, stopping local video and audio transmission and rendering. ```swift public func pauseSession() ``` -------------------------------- ### Implementing DHMessageDelegate Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md Implement the DHMessageDelegate protocol in your ViewController or manager object to receive DHMessage enums from the SDK, which communicate the session state. ```swift func digitalHumanMessage(_ message: DHMessage) { } ``` -------------------------------- ### digitalHumanMessage(_:) Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Protocols/DHMessageDelegate.html Receives DHMessage enums from the SDK, updating on state changes. ```APIDOC ## digitalHumanMessage(_:) ### Description Receives DHMessage enums from the SDK, updating on state changes. ### Method func ### Parameters #### Parameters - **message** (DHMessage) - DHMessage enum ``` -------------------------------- ### DHRTCConfig Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums.html Declaration for the DHRTCConfig enumeration, used for Real-Time Communication configuration. ```swift public enum DHRTCConfig : Int ``` -------------------------------- ### DHLoggingLevel Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums.html Declaration for the DHLoggingLevel enumeration, used for specifying logging levels. ```swift public enum DHLoggingLevel : Int ``` -------------------------------- ### micActivityError Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Indicates that an error occurred while processing microphone activity messages. ```APIDOC ## micActivityError ### Description An error occured with mic activity messages ### Declaration ```swift case micActivityError(error: Error) ``` ``` -------------------------------- ### DHRTCConfig Enumeration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHRTCConfig.html The DHRTCConfig enumeration provides options for configuring Real-Time Communication (RTC) behavior. It includes cases for passing through answers and candidates directly, and for prioritizing the answer in the connection process. ```APIDOC ## DHRTCConfig Enumeration ### Description The `DHRTCConfig` enumeration defines configuration options for Real-Time Communication (RTC) in the DigitalHumanSDK. It allows developers to specify how signaling messages, such as answers and candidates, should be handled. ### Cases * **passThru** * Description: Answers and Candidates are passed straight through to the RTCPeerConnection. * Declaration: ```swift case passThru ``` * **answerFirst** * Description: Undocumented. * Declaration: ```swift case answerFirst ``` ### Usage This enumeration is typically used when initializing or configuring RTC connections within the DigitalHumanSDK. ``` -------------------------------- ### Set Microphone Input Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Sets a specific microphone as the input device for the session. This function returns a success or failure message via the messageDelegate. ```swift public func setMicInput(_ input: AVAudioSessionPortDescription) ``` -------------------------------- ### DHMessageDelegate Protocol Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Protocols.html Delegate protocol for receiving DHMessages from the SDK. ```APIDOC ## DHMessageDelegate Protocol ### Description Delegate protocol for receiving DHMessages from the SDK. ### Declaration ```swift public protocol DHMessageDelegate : AnyObject ``` ``` -------------------------------- ### webRtcStats Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html WebRTC stats message (diagnostics). ```APIDOC ## webRtcStats ### Description WebRTC stats message (diagnostics). ### Parameters #### Path Parameters - **stats** ([String : String]) - Description: A dictionary containing WebRTC statistics. ``` -------------------------------- ### WebRTC Connectivity Message Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Provides debugging information related to WebRTC connectivity. ```swift case webRTC(message: String) ``` -------------------------------- ### Stop Recording Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Stops the recording of the user's audio and video. ```swift public func stopRecording() ``` -------------------------------- ### muteAudio Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Disables audio input to the current Digital Human session. ```APIDOC ## muteAudio ### Description Disables audio input to the current Digital Human session. ### Method `public func muteAudio()` ``` -------------------------------- ### webRtcData Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html WebRTC data channel message. ```APIDOC ## webRtcData ### Description WebRTC data channel message. ### Parameters #### Path Parameters - **data** (Data) - Description: The data received through the WebRTC channel. ``` -------------------------------- ### deviceCameraPositionNotFoundError Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Returned when a call to set the camera position cannot find that camera position. ```APIDOC ## deviceCameraPositionNotFoundError ### Description Returned when a call to set the camera position cannot find that camera position. ### Parameters #### Path Parameters - **position** (AVCaptureDevice.Position) - Description: The desired camera position that was not found. ``` -------------------------------- ### DHRTCConfig Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums.html Configuration options for Real-Time Communication (RTC) within the DigitalHumanSDK. This enumeration is of type Int. ```APIDOC ## Enumeration: DHRTCConfig ### Description Logging levels (Note: Description seems to be a duplicate from DHLoggingLevel, actual purpose might be RTC configuration). ### Declaration Swift ```swift public enum DHRTCConfig : Int ``` ### See Also [Enums/DHRTCConfig.html](Enums/DHRTCConfig.html) ``` -------------------------------- ### sessionInfo Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html A session debugging message, which can be a string or nil. ```APIDOC ## sessionInfo ### Description Session debugging message ### Declaration ```swift case sessionInfo(message: String?) ``` ``` -------------------------------- ### DHLoggingLevel Error Case Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHLoggingLevel.html Represents the logging level where both errors and warnings are sent back to the console. This provides more detail than the warning level. ```swift case error ``` -------------------------------- ### DHLoggingLevel Verbose Case Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHLoggingLevel.html Represents the logging level where all messages, including warnings, errors, and additional information, are sent back to the console. This is the most detailed logging level. ```swift case verbose ``` -------------------------------- ### DHLoggingLevel Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums.html Represents different logging levels for the DigitalHumanSDK. This enumeration is of type Int. ```APIDOC ## Enumeration: DHLoggingLevel ### Description Logging levels for the DigitalHumanSDK. ### Declaration Swift ```swift public enum DHLoggingLevel : Int ``` ### See Also [Enums/DHLoggingLevel.html](Enums/DHLoggingLevel.html) ``` -------------------------------- ### DHTokenOptions Structure Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Structs.html Declaration of the DHTokenOptions structure, used for configuring a DigitalHumanSDK session with a tokenId. ```swift public struct DHTokenOptions ``` -------------------------------- ### DHMessage Enum Cases Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html This section lists all the possible cases for the DHMessage enumeration, which are used to communicate different states and data from the DigitalHumanSDK. ```APIDOC ## DHMessage Enum Cases This enumeration defines the types of messages that can be received from the DigitalHumanSDK. ### Enum Cases * **avatarAnswer(answer: String, answerAvatar: String, answerSpeech: String)** The avatar’s answer to a question. * **avatarAvailable** An avatar is available. * **avatarQuestionText(question: String)** The question the user asked. * **avatarTextInputFinished** Deprecated - Use .startedSpeaking instead. Avatar has finished speaking the message. * **finishedSpeaking** Avatar has finished speaking the message. * **avatarUnavailable** There are no avatars currently available. * **avatarAnswerContent(content: String)** The avatar’s answer to a question (HTML Content). * **avatarAnswerHTML(html: String)** The avatar’s answer to a question (HTML Content). * **avatarRequestCompleted** The request to the avatar has been successfully completed (e.g. after a stopSpeaking call). * **avatarTextInputStarted** Deprecated - Use .startedSpeaking instead. Indicates when the avatar starts speaking. * **startedSpeaking** Indicates when the avatar starts speaking. * **deviceError(error: Error)** Error with configuring a device (microphone/camera). * **deviceSetCameraSuccess(position: AVCaptureDevice.Position)** User’s camera has been set successfully. * `position` (AVCaptureDevice.Position) - Position of the camera that has been set. * **deviceSetMicSuccess(audioInputDevice: AVAudioSessionPortDescription)** User’s microphone has been set successfully. * `audioInputDevice` (AVAudioSessionPortDescription) - The port description of the microphone that has been set. * **deviceCameraPositionNotFoundError(position: AVCaptureDevice.Position)** Returned when a call to set a camera position cannot find that camera position available. ``` -------------------------------- ### logMessage Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Debugging log message - refer to msg. ```APIDOC ## logMessage ### Description Debugging log message - refer to msg. ### Parameters #### Path Parameters - **msg** (String) - Description: The log message content. ``` -------------------------------- ### DHRTCConfig passThru Case Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHRTCConfig.html Represents the passThru configuration for DHRTCConfig. Answers and Candidates are passed straight through to the RTCPeerConnection. ```swift case passThru ``` -------------------------------- ### DHTextDelegate Protocol Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Protocols.html This is the Swift declaration for the DHTextDelegate protocol. It is used to receive chat text from the SDK. ```swift public protocol DHTextDelegate : AnyObject ``` -------------------------------- ### Digital Human Text Received Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Protocols/DHTextDelegate.html Implement this method to receive chat text from the Digital Human session. It takes a single String parameter representing the received text. ```swift func digitalHumanTextReceived(_ text: String) ``` -------------------------------- ### Send Transcript Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Sends text directly to the service. This function will not execute if the session is paused. ```swift public func sendTranscript(text: String) ``` -------------------------------- ### requestWebRTCStats Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Requests debugging information from the WebRTC session connected to the Digital Humans service. This information is received by the messageDelegate assigned to the SDK object via a webRtcStats message. ```APIDOC ## requestWebRTCStats ### Description Returns debugging information from the WebRTC session connected to the Digital Humans service. This is received by the messageDelegate assigned to the SDK object, via a webRtcStats message. ### Method `public func requestWebRTCStats()` ``` -------------------------------- ### Microphone Activity Message Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Indicates activity from the user's microphone. The level ranges from 0.0 (0%) to 1.0 (100%). ```swift case micActivity(level: Float) ``` -------------------------------- ### Unmute Audio Input Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Enables audio input to the current Digital Human session. ```Swift public func unmuteAudio() ``` -------------------------------- ### DHLoggingLevel Warning Case Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHLoggingLevel.html Represents the logging level where only warnings are sent back to the console. This level filters out informational messages. ```swift case warning ``` -------------------------------- ### DHError Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Structs/DHError.html Represents a custom error within the Digital Humans SDK. It conforms to the Error protocol and provides a localized description. ```APIDOC ## DHError ### Description Custom Digital Humans error class, subclassed from Error. Provides a localized description for SDK-related errors. ### Properties - **localizedDescription** (String) - Description for the DH Error. This is a computed property that returns the localized description of the error. ``` -------------------------------- ### Sending Messages Directly to the Service Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Send text or commands directly to the service, bypassing standard recording functions. ```APIDOC ## sendTranscript ### Description Send text directly to the service (rather than using recording functions for speech->text recognition). If the session is paused, then this will not run. ### Method `sendTranscript(text:)` ### Parameters * **text** (String) - The text string to send to the service. ``` ```APIDOC ## callWelcome ### Description Request a welcome message from the Digital Human. If the session is paused, then this will not run. ### Method `callWelcome()` ### Parameters None ### Response None ``` ```APIDOC ## stopSpeaking ### Description Passes a message to the avatar to stop speaking and clear the relevant unsolicited queue. ### Method `stopSpeaking()` ### Parameters None ### Response None ``` -------------------------------- ### End Digital Human Session Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md Terminates the current session with the Digital Human. This action disconnects the call and should be used when the interaction is complete. ```swift digitalHumanSDK.endSession() ``` -------------------------------- ### digitalHumanTextReceived(_:) Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Protocols/DHTextDelegate.html Receives chat text from the Digital Human session. This method is part of the DHTextDelegate protocol, which is designed to handle text-based communication with the Digital Human SDK. ```APIDOC ## digitalHumanTextReceived(_:) ### Description Receives chat text from the Digital Human session. ### Method func ### Parameters #### Parameters - **text** (String) - text received from the session ``` -------------------------------- ### DHLoggingLevel Enumeration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHLoggingLevel.html The DHLoggingLevel enumeration defines the different levels of logging verbosity available for the DigitalHumanSDK. Users can select a level to control the amount of information logged to the console. ```APIDOC ## Enumeration: DHLoggingLevel ### Description Controls the verbosity of console logs. Allows users to specify how much information is displayed. ### Cases * **`disabled`** * Description: Zero console logged messages. * Declaration: `case disabled` * **`warning`** * Description: Only warnings sent back to console. * Declaration: `case warning` * **`error`** * Description: Errors + Warnings sent back to the console. * Declaration: `case error` * **`verbose`** * Description: All warnings, errors, and additional information sent back to the console. * Declaration: `case verbose` ``` -------------------------------- ### speakerOff Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Disables audio output from the current Digital Human session. ```APIDOC ## speakerOff ### Description Disables audio output from the current Digital Human session. ### Method `public func speakerOff()` ``` -------------------------------- ### Swift DHMessageDelegate Method Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Protocols/DHMessageDelegate.html Implement this method to receive DHMessage enums from the SDK, which signal state changes. ```swift func digitalHumanMessage(_ message: DHMessage) ``` -------------------------------- ### Request WebRTC Statistics Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Requests debugging information from the WebRTC session. Statistics are received via the messageDelegate through a webRtcStats message. ```Swift public func requestWebRTCStats() ``` -------------------------------- ### Session Information Message Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html A debugging message related to session information. The message content is optional. ```swift case sessionInfo(message: String?) ``` -------------------------------- ### DHLoggingLevel Disabled Case Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHLoggingLevel.html Represents the logging level where no console messages are logged. This is the most restrictive level. ```swift case disabled ``` -------------------------------- ### DHMessage Enum Cases Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html These are the various cases for the DHMessage enumeration, representing different types of messages received from the DigitalHumanSDK. ```swift case avatarAnswer(answer: String, answerAvatar: String, answerSpeech: String) ``` ```swift case avatarAvailable ``` ```swift case avatarQuestionText(question: String) ``` ```swift case avatarTextInputFinished ``` ```swift case finishedSpeaking ``` ```swift case avatarUnavailable ``` ```swift case avatarAnswerContent(content: String) ``` ```swift case avatarAnswerHTML(html: String) ``` ```swift case avatarRequestCompleted ``` ```swift case avatarTextInputStarted ``` ```swift case startedSpeaking ``` ```swift case deviceError(error: Error) ``` ```swift case deviceSetCameraSuccess(position: AVCaptureDevice.Position) ``` ```swift case deviceSetMicSuccess(audioInputDevice: AVAudioSessionPortDescription) ``` ```swift case deviceCameraPositionNotFoundError(position: AVCaptureDevice.Position) ``` -------------------------------- ### DHMessage Cases Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html This snippet lists various cases of the DHMessage enum, each representing a specific event or message type within the DigitalHumanSDK. These include device errors, session states, recording events, connection statuses, and general messages. ```swift case deviceCameraPositionNotFoundError(position: AVCaptureDevice.Position) ``` ```swift case deviceAudioInputDeviceNotFound(input: AVAudioSessionPortDescription) ``` ```swift case setAudioOutputSuccess(output: AVAudioSessionPortDescription) ``` ```swift case setAudioOutputFailure(output: AVAudioSessionPortDescription) ``` ```swift case permissionErrorMicrophone ``` ```swift case permissionErrorCamera ``` ```swift case sessionReady ``` ```swift case sessionEnded ``` ```swift case sessionError(error: DHError) ``` ```swift case sessionLive ``` ```swift case sessionPaused ``` ```swift case sessionResumed ``` ```swift case recordingStarted ``` ```swift case recordingStopped ``` ```swift case recordingError ``` ```swift case connected ``` ```swift case connectionLost ``` ```swift case warning(msg: String) ``` ```swift case webRtcData(data: Data) ``` ```swift case webRtcStats(stats: [[String : String]]) ``` ```swift case logMessage(msg: String) ``` -------------------------------- ### DHMessage Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums.html Defines types of messages that can be received via delegation from the DigitalHumanSDK. ```APIDOC ## Enumeration: DHMessage ### Description DHMessage types, these are messages that can be received back via delegation from DigitalHumanSDK. ### Declaration Swift ```swift public enum DHMessage ``` ### See Also [Enums/DHMessage.html](Enums/DHMessage.html) ``` -------------------------------- ### DHMessageDelegate Protocol Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Protocols.html This is the Swift declaration for the DHMessageDelegate protocol. It is used to receive DHMessages from the SDK. ```swift public protocol DHMessageDelegate : AnyObject ``` -------------------------------- ### End Session Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Disconnects the active session and notifies the message delegate. ```swift public func endSession() ``` -------------------------------- ### Mute Audio Input Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Disables audio input to the current Digital Human session. ```Swift public func muteAudio() ``` -------------------------------- ### Online Status Update Message Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Represents a message indicating the online connectivity status. Use this to track connection state. ```swift case onlineStatusUpdateMessage(connected: Bool) ``` -------------------------------- ### Microphone Activity Error Message Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Signals that an error occurred while processing microphone activity messages. ```swift case micActivityError(error: Error) ``` -------------------------------- ### DHMessage Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums.html Declaration for the DHMessage enumeration, representing messages received via delegation from DigitalHumanSDK. ```swift public enum DHMessage ``` -------------------------------- ### onlineStatusUpdateMessage Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Enums/DHMessage.html Represents an online connectivity status update. It indicates whether the network connection is currently active or not. ```APIDOC ## onlineStatusUpdateMessage ### Description Online connectivity message - indicates whether the network is connected or not. ### Declaration ```swift case onlineStatusUpdateMessage(connected: Bool) ``` ``` -------------------------------- ### Stop Recording Voice Input Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/README.md Stops voice recording, allowing the Digital Human to process and respond. This should be called after the user has finished speaking. ```swift digitalHumanSDK.stopRecording() ``` -------------------------------- ### Stop Speaking Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Sends a message to the avatar to stop speaking and clear the relevant unsolicited queue. ```swift public func stopSpeaking() ``` -------------------------------- ### Disable Speaker Output Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Classes/DigitalHumanSDK.html Disables audio output from the current Digital Human session. ```Swift public func speakerOff() ``` -------------------------------- ### DHError Structure Declaration Source: https://gitlab.com/uneeq-oss/ios-sdk/-/blob/master/docs/Structs.html Declaration of the DHError structure, which is a custom error class subclassed from Error. ```swift public struct DHError : Error ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.