viam.components.audio_input
Submodules
Package Contents
Classes
AudioInput represents a component that can capture audio. |
- class viam.components.audio_input.AudioInput(name: str)[source]
AudioInput represents a component that can capture audio.
This acts as an abstract base class for any drivers representing specific audio input implementations. This cannot be used on its own. If the
__init__()
function is overridden, it must call thesuper().__init__()
function.- class Properties[source]
- property proto: viam.proto.component.audioinput.PropertiesResponse
- channel_count: int
- latency: datetime.timedelta
- sample_rate: int
- sample_size: int
- is_big_endian: bool
- is_float: bool
- is_interleaved: bool
- classmethod from_proto(proto: viam.proto.component.audioinput.PropertiesResponse) typing_extensions.Self [source]
- SUBTYPE: Final
- abstract async stream(*, timeout: Optional[float] = None, **kwargs) viam.media.audio.AudioStream [source]
Stream audio samples from the audio input of the underlying robot
- Returns:
The stream of audio chunks
- Return type:
- abstract async get_properties(*, timeout: Optional[float] = None, **kwargs) Properties [source]
Get the properties of the audio input of the underlying robot
- Returns:
The audio input properties
- Return type: