Audio

For clients to the Spot CAM Audio service.

class bosdyn.client.spot_cam.audio.AudioClient[source]

Bases: BaseClient

A client calling Spot CAM Audio service.

default_service_name = 'spot-cam-audio'
service_type = 'bosdyn.api.spot_cam.AudioService'
list_sounds(**kwargs)[source]

Retrieve the list of available sounds

list_sounds_async(**kwargs)[source]

Async version of list_sounds()

set_volume(percentage, **kwargs)[source]

Set the current volume as a percentage

set_volume_async(percentage, **kwargs)[source]

Async version of set_volume()

get_volume(**kwargs)[source]

Retrieve the current volume as a percentage

get_volume_async(**kwargs)[source]

Async version of get_volume()

play_sound(sound, gain=None, **kwargs)[source]

Play already uploaded sound with optional volume gain multiplier

play_sound_async(sound, gain=1.0, **kwargs)[source]

Async version of play_sound()

delete_sound(sound, **kwargs)[source]

Delete sound found in list_sounds()

delete_sound_async(sound, **kwargs)[source]

Async version of delete_sound()

load_sound(sound, data, max_chunk_size=1048576, **kwargs)[source]

Uploads the WAV data tagged with the specified Sound

set_audio_capture_channel(channel, **kwargs)[source]

Set the audio capture channel

Parameters:

channel (audio_pb2.AudioCaptureChannel) – Microphone to use

set_audio_capture_channel_async(channel, **kwargs)[source]

Async version of set_audio_capture_channel()

get_audio_capture_channel(**kwargs)[source]

Retrieve the audio capture channel (microphone)

get_audio_capture_channel_async(**kwargs)[source]

Async version of get_audio_capture_channel()

set_audio_capture_gain(channel, gain, **kwargs)[source]

Set the audio capture gain

Parameters:
  • channel (audio_pb2.AudioCaptureChannel) – Microphone to set gain for

  • gain (Double) – Microphone gain, 0.0 to 1.0

set_audio_capture_gain_async(channel, gain, **kwargs)[source]

Async version of set_audio_capture_gain()

get_audio_capture_gain(channel, **kwargs)[source]

Retrieve the audio capture gain (microphone volume)

Parameters:

channel (audio_pb2.AudioCaptureChannel) – Microphone to get gain for

get_audio_capture_gain_async(channel, **kwargs)[source]

Async version of get_audio_capture_gain()