viam.components.audio_out
Submodules
Classes
Information about an audio stream or device. |
|
Common audio codec identifiers. |
Package Contents
- class viam.components.audio_out.AudioInfo(*, codec: str = ..., sample_rate_hz: int = ..., num_channels: int = ...)
Bases:
google.protobuf.message.MessageInformation about an audio stream or device.
- codec: str
Audio codec used for the stream or device (e.g., “pcm16”, “pcm32float”, “mp3”)
- sample_rate_hz: int
Sample rate of the audio in Hz
- num_channels: int
Number of audio channels in the recording or playback
- class viam.components.audio_out.AudioCodec[source]
Bases:
str,enum.EnumCommon audio codec identifiers.
These constants represent commonly supported audio codecs for audioin and audioout components.
Example:
from viam.components.codecs import AudioCodec from viam.proto.common import AudioInfo audio_info = AudioInfo( codec=AudioCodec.PCM16, sample_rate_hz=44100, num_channels=2 )
- PCM16 = 'pcm16'
- PCM32 = 'pcm32'
- PCM32_FLOAT = 'pcm32_float'
- MP3 = 'mp3'
- AAC = 'aac'
- OPUS = 'opus'
- FLAC = 'flac'