viam.proto.component.audioin

@generated by Viam. Do not edit manually!

Classes

AudioInServiceBase

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

AudioInServiceStub

UnimplementedAudioInServiceBase

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

AudioChunk

Abstract base class for protocol messages.

GetAudioRequest

Abstract base class for protocol messages.

GetAudioResponse

Abstract base class for protocol messages.

Package Contents

class viam.proto.component.audioin.AudioInServiceBase[source]

Bases: abc.ABC

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

abstract GetAudio(stream: grpclib.server.Stream[component.audioin.v1.audioin_pb2.GetAudioRequest, component.audioin.v1.audioin_pb2.GetAudioResponse]) None[source]
Async:

abstract GetProperties(stream: grpclib.server.Stream[common.v1.common_pb2.GetPropertiesRequest, common.v1.common_pb2.GetPropertiesResponse]) None[source]
Async:

abstract DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
Async:

abstract GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) None[source]
Async:

__mapping__() Dict[str, grpclib.const.Handler][source]
class viam.proto.component.audioin.AudioInServiceStub(channel: grpclib.client.Channel)[source]
GetAudio
GetProperties
DoCommand
GetGeometries
class viam.proto.component.audioin.UnimplementedAudioInServiceBase[source]

Bases: AudioInServiceBase

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

async GetAudio(stream: grpclib.server.Stream[component.audioin.v1.audioin_pb2.GetAudioRequest, component.audioin.v1.audioin_pb2.GetAudioResponse]) None[source]
async GetProperties(stream: grpclib.server.Stream[common.v1.common_pb2.GetPropertiesRequest, common.v1.common_pb2.GetPropertiesResponse]) None[source]
async DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) None[source]
async GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) None[source]
class viam.proto.component.audioin.AudioChunk(*, audio_data: bytes = ..., audio_info: viam.gen.common.v1.common_pb2.AudioInfo | None = ..., start_timestamp_nanoseconds: int = ..., end_timestamp_nanoseconds: int = ..., sequence: 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.

audio_data: bytes

Audio data for this chunk, encoded according to the requested codec.

start_timestamp_nanoseconds: int
end_timestamp_nanoseconds: int
sequence: int

Sequential chunk number

property audio_info: viam.gen.common.v1.common_pb2.AudioInfo

Info about the audio stream for this chunk

HasField(field_name: Literal['audio_info', b'audio_info']) 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.audioin.GetAudioRequest(*, name: str = ..., duration_seconds: float = ..., codec: str = ..., request_id: str = ..., previous_timestamp_nanoseconds: int = ..., extra: google.protobuf.struct_pb2.Struct | 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.

name: str
duration_seconds: float

Desired duration of audio stream If not set or set to 0, the stream is infinite

codec: str

Requested audio codec for the response (e.g., “mp3”, “pcm16”)

request_id: str

To match a request to it’s responses

previous_timestamp_nanoseconds: int

Timestamp of the previous audio chunk, in nanoseconds, used for resuming and continuity.

property extra: google.protobuf.struct_pb2.Struct
HasField(field_name: Literal['extra', b'extra']) 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.audioin.GetAudioResponse(*, audio: global___AudioChunk | None = ..., request_id: 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.

request_id: str
property audio: global___AudioChunk
HasField(field_name: Literal['audio', b'audio']) 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.