"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2026 Phonexia s.r.o.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Phonexia Phoneme Recognition gRPC API.
"""

import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.internal.containers
import google.protobuf.message
import phonexia.grpc.common.core_pb2
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class RecognizeRequest(google.protobuf.message.Message):
    """The top-level message sent by the client for the <code>Recognize</code> method."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    AUDIO_FIELD_NUMBER: builtins.int
    @property
    def audio(self) -> phonexia.grpc.common.core_pb2.Audio:
        """Audio data to process. There is no minimum audio length limit."""

    def __init__(
        self,
        *,
        audio: phonexia.grpc.common.core_pb2.Audio | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["audio", b"audio"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["audio", b"audio"]) -> None: ...

Global___RecognizeRequest: typing_extensions.TypeAlias = RecognizeRequest

@typing.final
class RecognizeResponse(google.protobuf.message.Message):
    """The top-level message returned to the client by the <code>Recognize</code> method."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PHONEME_SEGMENTS_FIELD_NUMBER: builtins.int
    PROCESSED_AUDIO_LENGTH_FIELD_NUMBER: builtins.int
    @property
    def phoneme_segments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___PhonemeSegment]:
        """List of recognized phonemes with their time boundaries."""

    @property
    def processed_audio_length(self) -> google.protobuf.duration_pb2.Duration:
        """Total length of processed audio."""

    def __init__(
        self,
        *,
        phoneme_segments: collections.abc.Iterable[Global___PhonemeSegment] | None = ...,
        processed_audio_length: google.protobuf.duration_pb2.Duration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["processed_audio_length", b"processed_audio_length"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["phoneme_segments", b"phoneme_segments", "processed_audio_length", b"processed_audio_length"]) -> None: ...

Global___RecognizeResponse: typing_extensions.TypeAlias = RecognizeResponse

@typing.final
class PhonemeSegment(google.protobuf.message.Message):
    """A single phoneme segment with timing information."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    PHONEME_FIELD_NUMBER: builtins.int
    START_TIME_FIELD_NUMBER: builtins.int
    END_TIME_FIELD_NUMBER: builtins.int
    phoneme: builtins.str
    """The recognized phoneme."""
    @property
    def start_time(self) -> google.protobuf.duration_pb2.Duration:
        """Start time of the phoneme in the audio."""

    @property
    def end_time(self) -> google.protobuf.duration_pb2.Duration:
        """End time of the phoneme in the audio."""

    def __init__(
        self,
        *,
        phoneme: builtins.str = ...,
        start_time: google.protobuf.duration_pb2.Duration | None = ...,
        end_time: google.protobuf.duration_pb2.Duration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["end_time", b"end_time", "start_time", b"start_time"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["end_time", b"end_time", "phoneme", b"phoneme", "start_time", b"start_time"]) -> None: ...

Global___PhonemeSegment: typing_extensions.TypeAlias = PhonemeSegment
