"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2025 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 Gender Identification 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 IdentifyRequest(google.protobuf.message.Message):
    """The top-level message sent by the client for the <code>Identify</code>
    method.
    The method accepts either audio data or voiceprints.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    VOICEPRINTS_FIELD_NUMBER: builtins.int
    AUDIO_FIELD_NUMBER: builtins.int
    CONFIG_FIELD_NUMBER: builtins.int
    @property
    def voiceprints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[phonexia.grpc.common.core_pb2.Voiceprint]:
        """List of voiceprints for the identification."""

    @property
    def audio(self) -> phonexia.grpc.common.core_pb2.Audio:
        """Audio data in which gender is to be identified. There is no minimum audio length limit."""

    @property
    def config(self) -> Global___IdentifyConfig:
        """Configuration for the gender identification."""

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

Global___IdentifyRequest: typing_extensions.TypeAlias = IdentifyRequest

@typing.final
class IdentifyConfig(google.protobuf.message.Message):
    """Message used for configuration of the <code>Identify</code> method."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SPEECH_LENGTH_FIELD_NUMBER: builtins.int
    @property
    def speech_length(self) -> google.protobuf.duration_pb2.Duration:
        """Specifies the maximum speech length from which the gender will be identified.
        If there is less speech in the audio than the specified duration, the gender
        will be identified from the entire audio. This option is applicable only for Audio
        data.
        """

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

Global___IdentifyConfig: typing_extensions.TypeAlias = IdentifyConfig

@typing.final
class Score(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SCORE_LLR_FIELD_NUMBER: builtins.int
    PROBABILITY_FIELD_NUMBER: builtins.int
    score_llr: builtins.float
    """Log-likelihood ratio score. The LLR provides a quantitative measure of
    how much more likely the data is under one model (gender) compared
    to another.
    A positive LLR suggests that the respective model is more likely to be
    supported by the data than the other model, while the negative LLR suggests
    the opposite.
    """
    probability: builtins.float
    """Decimal value between 0.0 and 1.0, representing a probability."""
    def __init__(
        self,
        *,
        score_llr: builtins.float = ...,
        probability: builtins.float = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing.Literal["probability", b"probability", "score_llr", b"score_llr"]) -> None: ...

Global___Score: typing_extensions.TypeAlias = Score

@typing.final
class IdentifyResult(google.protobuf.message.Message):
    """A gender identification result. It contains scores for respective genders."""

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    SCORE_MALE_FIELD_NUMBER: builtins.int
    SCORE_FEMALE_FIELD_NUMBER: builtins.int
    SPEECH_LENGTH_FIELD_NUMBER: builtins.int
    @property
    def score_male(self) -> Global___Score:
        """Score for male. Not set if file is empty or doesn't contain enough speech."""

    @property
    def score_female(self) -> Global___Score:
        """Score for female. Not set if file is empty or doesn't contain enough speech."""

    @property
    def speech_length(self) -> google.protobuf.duration_pb2.Duration:
        """Total speech length from which the gender were recognized."""

    def __init__(
        self,
        *,
        score_male: Global___Score | None = ...,
        score_female: Global___Score | None = ...,
        speech_length: google.protobuf.duration_pb2.Duration | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing.Literal["_score_female", b"_score_female", "_score_male", b"_score_male", "score_female", b"score_female", "score_male", b"score_male", "speech_length", b"speech_length"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing.Literal["_score_female", b"_score_female", "_score_male", b"_score_male", "score_female", b"score_female", "score_male", b"score_male", "speech_length", b"speech_length"]) -> None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing.Literal["_score_female", b"_score_female"]) -> typing.Literal["score_female"] | None: ...
    @typing.overload
    def WhichOneof(self, oneof_group: typing.Literal["_score_male", b"_score_male"]) -> typing.Literal["score_male"] | None: ...

Global___IdentifyResult: typing_extensions.TypeAlias = IdentifyResult

@typing.final
class IdentifyResponse(google.protobuf.message.Message):
    """The top-level message returned to the client by the <code>Identify</code>
    method. It contains the result as one or more <code>IdentifyResult</code>
    messages.
    """

    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    RESULTS_FIELD_NUMBER: builtins.int
    PROCESSED_AUDIO_LENGTH_FIELD_NUMBER: builtins.int
    @property
    def results(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[Global___IdentifyResult]:
        """Sequential list of results corresponding to sequential list of voiceprints
        in <code>IdentifyRequest</code>. Contains single result when using audio.
        """

    @property
    def processed_audio_length(self) -> google.protobuf.duration_pb2.Duration:
        """When available, total length of the processed audio.
        Set only if audio is used in <code>IdentifyRequest</code>.
        """

    def __init__(
        self,
        *,
        results: collections.abc.Iterable[Global___IdentifyResult] | 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["processed_audio_length", b"processed_audio_length", "results", b"results"]) -> None: ...

Global___IdentifyResponse: typing_extensions.TypeAlias = IdentifyResponse
