LocalAudio

The LocalAudio model allows managing the local participant's audio settings.

This model is supported only in SDK 3.7 and later.

Available in the package com.voxeet.sdk.services.audio.LocalAudio.

Methods

connect

connect(@NonNull device: MediaDevice): Promise

Connects a specific device to the SDK.

Parameters

NameTypeDescription
deviceMediaDevicenon null The device to connect.

Returns: @NonNull Promise - The promise to resolve.


currentMediaDevice

currentMediaDevice(): Promise

Gets a media device that is currently connected.

Returns: @NonNull Promise - The promise to resolve.


disconnect

disconnect(@NonNull device: MediaDevice): Promise

Disconnect a specific device from the SDK.

Parameters

NameTypeDescription
deviceMediaDevicenon null The device to disconnect.

Returns: @NonNull Promise - The promise to resolve.


enumerateDevices

enumerateDevices(): Promise

Enumerates all connected audio devices that are available for the local participant.

Returns: @NonNull Promise - The promise to resolve.


getCaptureMode

getCaptureMode(): AudioCaptureMode

Gets the local participant's audio capture mode in Dolby Voice conferences.

Returns: @NonNull AudioCaptureMode


getSoundManager

getSoundManager(): SoundManager

Gets the SoundManager instance.

Returns: @NonNull SoundManager


isDefaultSpeakerMode

isDefaultSpeakerMode(): boolean

Checks if the default mode when entering the conference will be using the external speaker.

Returns: boolean - gives the expected audio device used in case of internal / external speaker only


preview

preview(): AudioPreview

Allows the local participant to test different capture modes and voice fonts before a conference. The method 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: @NonNull AudioPreview


registerLocalInputAudioCallback

registerLocalInputAudioCallback(callback: LocalInputAudioCallback): void

Registers a callback that allows getting the local audio input. The method 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 method is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
callbackLocalInputAudioCallbackThe callback to register.

registerUpdateDevices

registerUpdateDevices(callback: SoundManager.Call): boolean

Registers external listeners to update the MediaDevice platform.

Parameters

NameTypeDescription
callbackSoundManager.CallThe callback to register.

Returns: boolean - Information whether the registered call is successful.


setCaptureMode

setCaptureMode(@NonNull audioCaptureMode: AudioCaptureMode): void

Sets the local participant's audio capture mode to allow changing audio processing. 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 method is supported only in Dolby Voice conferences.

Parameters

NameTypeDescription
audioCaptureModeAudioCaptureModenon null The preferred audio capture mode and additional settings for the selected mode.

setDefaultSpeakerMode

setDefaultSpeakerMode(isSpeaker: boolean): void

Sets the default speaker mode.

Parameters

NameTypeDescription
isSpeakerbooleanThe default value of the speaker mode.

setLocalInputAudioProcessor

setLocalInputAudioProcessor(callback: LocalInputAudioProcessor): void

Sets a callback that allows 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.

Parameters

NameTypeDescription
callbackLocalInputAudioProcessorThe callback to set.

start

start(): Promise

Starts sending the local participant’s audio stream 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.

Returns: @NonNull Promise


stop

stop(): Promise

Stops sending local participant’s 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.

Returns: @NonNull Promise


unregisterLocalInputAudioCallback

unregisterLocalInputAudioCallback(callback: LocalInputAudioCallback): void

Unregisters a callback that allows getting the local audio input. The method is supported in SDK 3.8 and later.

Parameters

NameTypeDescription
callbackLocalInputAudioCallbackThe callback to unregister.

unregisterUpdateDevices

unregisterUpdateDevices(callback: SoundManager.Call): void

Unregisters external listeners to update the MediaDevice platform.

Parameters

NameTypeDescription
callbackSoundManager.CallThe callback to unregister.