viam.gen.component.audioin.v1.audioin_pb2 ========================================= .. py:module:: viam.gen.component.audioin.v1.audioin_pb2 .. autoapi-nested-parse:: @generated by mypy-protobuf. Do not edit manually! isort:skip_file Attributes ---------- .. autoapisummary:: viam.gen.component.audioin.v1.audioin_pb2.DESCRIPTOR viam.gen.component.audioin.v1.audioin_pb2.global___GetAudioRequest viam.gen.component.audioin.v1.audioin_pb2.global___GetAudioResponse viam.gen.component.audioin.v1.audioin_pb2.global___AudioChunk Classes ------- .. autoapisummary:: viam.gen.component.audioin.v1.audioin_pb2.GetAudioRequest viam.gen.component.audioin.v1.audioin_pb2.GetAudioResponse viam.gen.component.audioin.v1.audioin_pb2.AudioChunk Module Contents --------------- .. py:data:: DESCRIPTOR :type: google.protobuf.descriptor.FileDescriptor .. 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:data:: global___GetAudioRequest .. 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. .. py:data:: global___GetAudioResponse .. 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:data:: global___AudioChunk