viam.proto.component.audioinput

@generated by Viam. Do not edit manually!

Package Contents

Classes

AudioInputServiceBase

Helper class that provides a standard way to create an ABC using

AudioInputServiceStub

AudioChunk

Abstract base class for protocol messages.

AudioChunkInfo

Abstract base class for protocol messages.

ChunksRequest

Abstract base class for protocol messages.

ChunksResponse

Abstract base class for protocol messages.

PropertiesRequest

Abstract base class for protocol messages.

PropertiesResponse

Abstract base class for protocol messages.

RecordRequest

Abstract base class for protocol messages.

SampleFormat

class viam.proto.component.audioinput.AudioInputServiceBase[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract async Chunks(stream: grpclib.server.Stream[component.audioinput.v1.audioinput_pb2.ChunksRequest, component.audioinput.v1.audioinput_pb2.ChunksResponse]) None[source]
abstract async Properties(stream: grpclib.server.Stream[component.audioinput.v1.audioinput_pb2.PropertiesRequest, component.audioinput.v1.audioinput_pb2.PropertiesResponse]) None[source]
abstract async Record(stream: grpclib.server.Stream[component.audioinput.v1.audioinput_pb2.RecordRequest, google.api.httpbody_pb2.HttpBody]) None[source]
abstract async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
abstract async GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) None[source]
__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.component.audioinput.AudioInputServiceStub(channel: grpclib.client.Channel)[source]
class viam.proto.component.audioinput.AudioChunk(*, data: bytes = ..., length: int = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

data: bytes

Data is PCM data that is organized according to the sample format along with its possible interleaving. Data in each format is Little Endian.

length: int

Length is the number of samples

class viam.proto.component.audioinput.AudioChunkInfo(*, sample_format: global___SampleFormat = ..., channels: int = ..., sampling_rate: int = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

sample_format: global___SampleFormat

Actual sample encoding format of the response

channels: int
sampling_rate: int
class viam.proto.component.audioinput.ChunksRequest(*, name: str = ..., sample_format: global___SampleFormat = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

name: str

Name of an audio input

sample_format: global___SampleFormat

Requested sample encoding format of the response

class viam.proto.component.audioinput.ChunksResponse(*, info: global___AudioChunkInfo | None = ..., chunk: global___AudioChunk | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property info: global___AudioChunkInfo
property chunk: global___AudioChunk
HasField(field_name: Literal[chunk, b'chunk', info, b'info', type, b'type']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

WhichOneof(oneof_group: Literal[type, b'type']) Literal[info, chunk] | None

Returns the name of the field that is set inside a oneof group.

If no field is set, returns None.

Parameters:

oneof_group (str) – the name of the oneof group to check.

Returns:

The name of the group that is set, or None.

Return type:

str or None

Raises:

ValueError – no group with the given name exists

class viam.proto.component.audioinput.PropertiesRequest(*, name: str = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

name: str

Name of an audio input

class viam.proto.component.audioinput.PropertiesResponse(*, channel_count: int = ..., latency: google.protobuf.duration_pb2.Duration | None = ..., sample_rate: int = ..., sample_size: int = ..., is_big_endian: bool = ..., is_float: bool = ..., is_interleaved: bool = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property latency: google.protobuf.duration_pb2.Duration
channel_count: int
sample_rate: int
sample_size: int
is_big_endian: bool
is_float: bool
is_interleaved: bool
HasField(field_name: Literal[latency, b'latency']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.component.audioinput.RecordRequest(*, name: str = ..., duration: google.protobuf.duration_pb2.Duration | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

property duration: google.protobuf.duration_pb2.Duration
name: str

Name of an audio input

HasField(field_name: Literal[duration, b'duration']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.proto.component.audioinput.SampleFormat

Bases: _SampleFormat