viam.proto.component.audioin ============================ .. py:module:: viam.proto.component.audioin .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Classes ------- .. autoapisummary:: viam.proto.component.audioin.AudioInServiceBase viam.proto.component.audioin.AudioInServiceStub viam.proto.component.audioin.UnimplementedAudioInServiceBase viam.proto.component.audioin.AudioChunk viam.proto.component.audioin.GetAudioRequest viam.proto.component.audioin.GetAudioResponse Package Contents ---------------- .. py:class:: AudioInServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetAudio(stream: grpclib.server.Stream[component.audioin.v1.audioin_pb2.GetAudioRequest, component.audioin.v1.audioin_pb2.GetAudioResponse]) -> None :abstractmethod: :async: .. py:method:: GetProperties(stream: grpclib.server.Stream[common.v1.common_pb2.GetPropertiesRequest, common.v1.common_pb2.GetPropertiesResponse]) -> None :abstractmethod: :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :abstractmethod: :async: .. py:method:: GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) -> None :abstractmethod: :async: .. py:method:: __mapping__() -> Dict[str, grpclib.const.Handler] .. py:class:: AudioInServiceStub(channel: grpclib.client.Channel) .. py:attribute:: GetAudio .. py:attribute:: GetProperties .. py:attribute:: DoCommand .. py:attribute:: GetGeometries .. py:class:: UnimplementedAudioInServiceBase Bases: :py:obj:`AudioInServiceBase` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetAudio(stream: grpclib.server.Stream[component.audioin.v1.audioin_pb2.GetAudioRequest, component.audioin.v1.audioin_pb2.GetAudioResponse]) -> None :async: .. py:method:: GetProperties(stream: grpclib.server.Stream[common.v1.common_pb2.GetPropertiesRequest, common.v1.common_pb2.GetPropertiesResponse]) -> None :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :async: .. py:method:: GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) -> None :async: .. py:class:: 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: :py:obj:`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. .. py:attribute:: audio_data :type: bytes Audio data for this chunk, encoded according to the requested codec. .. py:attribute:: start_timestamp_nanoseconds :type: int .. py:attribute:: end_timestamp_nanoseconds :type: int .. py:attribute:: sequence :type: int Sequential chunk number .. py:property:: audio_info :type: viam.gen.common.v1.common_pb2.AudioInfo Info about the audio stream for this chunk .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetAudioRequest(*, name: str = ..., duration_seconds: float = ..., codec: str = ..., request_id: str = ..., previous_timestamp_nanoseconds: int = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`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. .. py:attribute:: name :type: str .. py:attribute:: duration_seconds :type: float Desired duration of audio stream If not set or set to 0, the stream is infinite .. py:attribute:: codec :type: str Requested audio codec for the response (e.g., "mp3", "pcm16") .. py:attribute:: request_id :type: str To match a request to it's responses .. py:attribute:: previous_timestamp_nanoseconds :type: int Timestamp of the previous audio chunk, in nanoseconds, used for resuming and continuity. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetAudioResponse(*, audio: global___AudioChunk | None = ..., request_id: str = ...) Bases: :py:obj:`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. .. py:attribute:: request_id :type: str .. py:property:: audio :type: global___AudioChunk .. py:method:: 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, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message.