:py:mod:`viam.gen.component.audioinput.v1.audioinput_pb2` ========================================================= .. py:module:: viam.gen.component.audioinput.v1.audioinput_pb2 .. autoapi-nested-parse:: @generated by mypy-protobuf. Do not edit manually! isort:skip_file Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: viam.gen.component.audioinput.v1.audioinput_pb2.SampleFormat viam.gen.component.audioinput.v1.audioinput_pb2.RecordRequest viam.gen.component.audioinput.v1.audioinput_pb2.AudioChunkInfo viam.gen.component.audioinput.v1.audioinput_pb2.AudioChunk viam.gen.component.audioinput.v1.audioinput_pb2.ChunksRequest viam.gen.component.audioinput.v1.audioinput_pb2.ChunksResponse viam.gen.component.audioinput.v1.audioinput_pb2.PropertiesRequest viam.gen.component.audioinput.v1.audioinput_pb2.PropertiesResponse Attributes ~~~~~~~~~~ .. autoapisummary:: viam.gen.component.audioinput.v1.audioinput_pb2.DESCRIPTOR viam.gen.component.audioinput.v1.audioinput_pb2.SAMPLE_FORMAT_UNSPECIFIED viam.gen.component.audioinput.v1.audioinput_pb2.SAMPLE_FORMAT_INT16_INTERLEAVED viam.gen.component.audioinput.v1.audioinput_pb2.SAMPLE_FORMAT_FLOAT32_INTERLEAVED viam.gen.component.audioinput.v1.audioinput_pb2.global___SampleFormat viam.gen.component.audioinput.v1.audioinput_pb2.global___RecordRequest viam.gen.component.audioinput.v1.audioinput_pb2.global___AudioChunkInfo viam.gen.component.audioinput.v1.audioinput_pb2.global___AudioChunk viam.gen.component.audioinput.v1.audioinput_pb2.global___ChunksRequest viam.gen.component.audioinput.v1.audioinput_pb2.global___ChunksResponse viam.gen.component.audioinput.v1.audioinput_pb2.global___PropertiesRequest viam.gen.component.audioinput.v1.audioinput_pb2.global___PropertiesResponse .. py:data:: DESCRIPTOR :type: google.protobuf.descriptor.FileDescriptor .. py:class:: SampleFormat Bases: :py:obj:`_SampleFormat` .. py:data:: SAMPLE_FORMAT_UNSPECIFIED :type: SampleFormat .. py:data:: SAMPLE_FORMAT_INT16_INTERLEAVED :type: SampleFormat .. py:data:: SAMPLE_FORMAT_FLOAT32_INTERLEAVED :type: SampleFormat .. py:data:: global___SampleFormat .. py:class:: RecordRequest(*, name: str = ..., duration: google.protobuf.duration_pb2.Duration | 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:property:: duration :type: google.protobuf.duration_pb2.Duration .. py:attribute:: name :type: str Name of an audio input .. py:method:: 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, :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___RecordRequest .. py:class:: AudioChunkInfo(*, sample_format: global___SampleFormat = ..., channels: int = ..., sampling_rate: 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:: sample_format :type: global___SampleFormat Actual sample encoding format of the response .. py:attribute:: channels :type: int .. py:attribute:: sampling_rate :type: int .. py:data:: global___AudioChunkInfo .. py:class:: AudioChunk(*, data: bytes = ..., length: 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:: data :type: 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. .. py:attribute:: length :type: int Length is the number of samples .. py:data:: global___AudioChunk .. py:class:: ChunksRequest(*, name: str = ..., sample_format: global___SampleFormat = ...) 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 Name of an audio input .. py:attribute:: sample_format :type: global___SampleFormat Requested sample encoding format of the response .. py:data:: global___ChunksRequest .. py:class:: ChunksResponse(*, info: global___AudioChunkInfo | None = ..., chunk: global___AudioChunk | 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:property:: info :type: global___AudioChunkInfo .. py:property:: chunk :type: global___AudioChunk .. py:method:: 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, :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:method:: 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. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:data:: global___ChunksResponse .. py:class:: PropertiesRequest(*, name: 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:: name :type: str Name of an audio input .. py:data:: global___PropertiesRequest .. py:class:: 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: :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:property:: latency :type: google.protobuf.duration_pb2.Duration .. py:attribute:: channel_count :type: int .. py:attribute:: sample_rate :type: int .. py:attribute:: sample_size :type: int .. py:attribute:: is_big_endian :type: bool .. py:attribute:: is_float :type: bool .. py:attribute:: is_interleaved :type: bool .. py:method:: 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, :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___PropertiesResponse