LocalAudio
The LocalAudio model allows enabling and disabling the local participant's audio as well as setting and checking the capture mode and comfort noise level.
This model is supported only in SDK 3.7 and later.
Accessors
captureMode
▸ captureMode: AudioCaptureMode
Allows setting and getting the local participant's audio capture mode. The following modes are available:
-
Standard: The default mode that optimizes captured audio for speech by aggressively removing non-speech content, such as background noise. The mode is supported in SDK 3.7 and later.
-
Unprocessed: Reduces latency that comes from audio processing and prevents over-processing audio in some scenarios. The mode is supported in SDK 3.7 and later.
Note: In SDK 3.8 and prior releases, this API is supported only in Dolby Voice conferences.
Returns: AudioCaptureMode
delegate
▸ delegate: AudioDelegate
The object that acts as the delegate of the audio samples. It allows accessing the local participant's audio stream before sending the stream through an open session. You may use it to build speech recognition or audio moderation. For more information, see the Accessing the Local Audio Stream guide.
The API is supported in SDK 3.8 and later.
Returns: AudioDelegate
processor
▸ processor: LocalInputAudioProcessor
Allows setting the processor responsible for pre-processing the local audio stream before sending the stream through an open session. You may use it to, for example, implement your own voice effects or remove or bleep out curse words from the sent audio. For more information, see the Pre-processing the Local Audio Stream guide.
Returns: LocalInputAudioProcessor
preview
▸ preview: AudioPreview
Allows the local participant to test different capture modes and voice fonts before a conference. The accessor sets a preview recorder that records the participant's audio and plays it back. Before playing the recorded audio, set the captureMode to a preferred setting that you wish to try. The method is supported only in SDK 3.10 and later.
Returns: AudioPreview
Methods
getComfortNoiseLevel
▸ getComfortNoiseLevel(completion
: ((ComfortNoiseLevel?, Error?) -> Void))
Returns the comfort noise level setting for output devices in Dolby Voice conferences.
setComfortNoiseLevel
▸ setComfortNoiseLevel(comfortNoiseLevel
: ComfortNoiseLevel, completion
: ((Error?) -> Void)?)
Sets the comfort noise level for output devices in Dolby Voice conferences.
Parameters:
Name | Type | Description |
---|---|---|
level | ComfortNoiseLevel | The comfort noise level. |
start
▸ start(completion
: ((_ error: Error?) -> Void)?)
Enables the local participant's audio and sends the audio to a conference. The method is available only to participants who joined a conference using the join method; it is not available for listeners.
The method requires a few seconds to become effective.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
completion | ((_ error: NSError) -> Void)? | nil | The block to execute when the query completes. |
stop
▸ stop(completion
: ((_ error: Error?) -> Void)?)
Disables the local participant's audio and stops sending the audio to a conference. The method is available only to participants who joined a conference using the join method; it is not available for listeners.
The method requires a few seconds to become effective.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
completion | ((_ error: NSError) -> Void)? | nil | The block to execute when the query completes |
Updated 24 days ago