chore: librarian generate pull request: 20260107T084051Z (#14995) · googleapis/google-cloud-python@b3cb4de

@@ -38,6 +38,7 @@

3838

"AutoDetectDecodingConfig",

3939

"ExplicitDecodingConfig",

4040

"SpeakerDiarizationConfig",

41+

"CustomPromptConfig",

4142

"RecognitionFeatures",

4243

"TranscriptNormalization",

4344

"TranslationConfig",

@@ -898,17 +899,13 @@ class SpeakerDiarizationConfig(proto.Message):

898899899900

Attributes:

900901

min_speaker_count (int):

901-

Required. Minimum number of speakers in the conversation.

902-

This range gives you more flexibility by allowing the system

903-

to automatically determine the correct number of speakers.

904-905-

To fix the number of speakers detected in the audio, set

906-

``min_speaker_count`` = ``max_speaker_count``.

902+

Optional. The system automatically determines

903+

the number of speakers. This value is not

904+

currently used.

907905

max_speaker_count (int):

908-

Required. Maximum number of speakers in the conversation.

909-

Valid values are: 1-6. Must be >= ``min_speaker_count``.

910-

This range gives you more flexibility by allowing the system

911-

to automatically determine the correct number of speakers.

906+

Optional. The system automatically determines

907+

the number of speakers. This value is not

908+

currently used.

912909

"""

913910914911

min_speaker_count: int = proto.Field(

@@ -921,6 +918,21 @@ class SpeakerDiarizationConfig(proto.Message):

921918

)

922919923920921+

class CustomPromptConfig(proto.Message):

922+

r"""Configuration to enable custom prompt in chirp3.

923+924+

Attributes:

925+

custom_prompt (str):

926+

Optional. The custom instructions to override

927+

the existing instructions for chirp3.

928+

"""

929+930+

custom_prompt: str = proto.Field(

931+

proto.STRING,

932+

number=1,

933+

)

934+935+924936

class RecognitionFeatures(proto.Message):

925937

r"""Available recognition features.

926938

@@ -962,24 +974,18 @@ class RecognitionFeatures(proto.Message):

962974

multi_channel_mode (google.cloud.speech_v2.types.RecognitionFeatures.MultiChannelMode):

963975

Mode for recognizing multi-channel audio.

964976

diarization_config (google.cloud.speech_v2.types.SpeakerDiarizationConfig):

965-

Configuration to enable speaker diarization

966-

and set additional parameters to make

967-

diarization better suited for your application.

968-

When this is enabled, we send all the words from

969-

the beginning of the audio for the top

970-

alternative in every consecutive STREAMING

971-

responses. This is done in order to improve our

972-

speaker tags as our models learn to identify the

973-

speakers in the conversation over time. For

974-

non-streaming requests, the diarization results

975-

will be provided only in the top alternative of

976-

the FINAL SpeechRecognitionResult.

977+

Configuration to enable speaker diarization.

978+

To enable diarization, set this field to an

979+

empty SpeakerDiarizationConfig message.

977980

max_alternatives (int):

978981

Maximum number of recognition hypotheses to be returned. The

979982

server may return fewer than ``max_alternatives``. Valid

980983

values are ``0``-``30``. A value of ``0`` or ``1`` will

981984

return a maximum of one. If omitted, will return a maximum

982985

of one.

986+

custom_prompt_config (google.cloud.speech_v2.types.CustomPromptConfig):

987+

Optional. Configuration to enable custom

988+

prompt for chirp3.

983989

"""

984990985991

class MultiChannelMode(proto.Enum):

@@ -1038,6 +1044,11 @@ class MultiChannelMode(proto.Enum):

10381044

proto.INT32,

10391045

number=16,

10401046

)

1047+

custom_prompt_config: "CustomPromptConfig" = proto.Field(

1048+

proto.MESSAGE,

1049+

number=18,

1050+

message="CustomPromptConfig",

1051+

)

104110521042105310431054

class TranscriptNormalization(proto.Message):

@@ -1410,13 +1421,20 @@ class RecognizeRequest(proto.Message):

14101421

class RecognitionResponseMetadata(proto.Message):

14111422

r"""Metadata about the recognition request and response.

141214231424+

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

1425+14131426

Attributes:

14141427

request_id (str):

14151428

Global request identifier auto-generated by

14161429

the API.

14171430

total_billed_duration (google.protobuf.duration_pb2.Duration):

14181431

When available, billed audio seconds for the

14191432

corresponding request.

1433+

prompt (str):

1434+

Optional. Output only. Provides the prompt

1435+

used for the recognition request.

1436+1437+

This field is a member of `oneof`_ ``_prompt``.

14201438

"""

1421143914221440

request_id: str = proto.Field(

@@ -1428,6 +1446,11 @@ class RecognitionResponseMetadata(proto.Message):

14281446

number=6,

14291447

message=duration_pb2.Duration,

14301448

)

1449+

prompt: str = proto.Field(

1450+

proto.STRING,

1451+

number=10,

1452+

optional=True,

1453+

)

143114541432145514331456

class SpeechRecognitionAlternative(proto.Message):