diff --git a/google/genai/_gaos/resources/interactions/__init__.py b/google/genai/_gaos/resources/interactions/__init__.py index 5bdf1ef5e..f5de80186 100644 --- a/google/genai/_gaos/resources/interactions/__init__.py +++ b/google/genai/_gaos/resources/interactions/__init__.py @@ -97,6 +97,7 @@ from ...types.interactions.toolchoiceconfig import ToolChoiceConfig from ...types.interactions.toolchoicetype import ToolChoiceType from ...types.interactions.transcriptionconfig import TranscriptionConfig +from ...types.interactions.transcriptionmode import TranscriptionMode from ...types.interactions.urlcitation import URLCitation from ...types.interactions.urlcontextcallarguments import URLContextCallArguments from ...types.interactions.urlcontextcallstep import URLContextCallStep @@ -201,6 +202,7 @@ "ToolChoiceConfig", "ToolChoiceType", "TranscriptionConfig", + "TranscriptionMode", "URLCitation", "URLContextCallArguments", "URLContextCallStep", diff --git a/google/genai/_gaos/types/interactions/__init__.py b/google/genai/_gaos/types/interactions/__init__.py index 71bfd6481..c93129d00 100644 --- a/google/genai/_gaos/types/interactions/__init__.py +++ b/google/genai/_gaos/types/interactions/__init__.py @@ -366,6 +366,7 @@ from .toolchoiceconfig import ToolChoiceConfig, ToolChoiceConfigParam from .toolchoicetype import ToolChoiceType from .transcriptionconfig import TranscriptionConfig, TranscriptionConfigParam + from .transcriptionmode import TranscriptionMode from .urlcitation import URLCitation, URLCitationParam from .urlcontext import URLContext, URLContextParam from .urlcontextcallarguments import ( @@ -732,6 +733,7 @@ "ToolParam", "TranscriptionConfig", "TranscriptionConfigParam", + "TranscriptionMode", "Transform", "TransformParam", "URLCitation", @@ -1117,6 +1119,7 @@ "ToolChoiceType": ".toolchoicetype", "TranscriptionConfig": ".transcriptionconfig", "TranscriptionConfigParam": ".transcriptionconfig", + "TranscriptionMode": ".transcriptionmode", "URLCitation": ".urlcitation", "URLCitationParam": ".urlcitation", "URLContext": ".urlcontext", diff --git a/google/genai/_gaos/types/interactions/transcriptionconfig.py b/google/genai/_gaos/types/interactions/transcriptionconfig.py index f86a67495..99d9747d0 100644 --- a/google/genai/_gaos/types/interactions/transcriptionconfig.py +++ b/google/genai/_gaos/types/interactions/transcriptionconfig.py @@ -18,6 +18,7 @@ from __future__ import annotations from .. import BaseModel, UNSET_SENTINEL +from .transcriptionmode import TranscriptionMode import pydantic from pydantic import model_serializer from typing import List, Optional @@ -39,6 +40,11 @@ class TranscriptionConfigParam(TypedDict): r"""Optional. BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection. """ + mode: NotRequired[TranscriptionMode] + r"""Configures transcription mode. Supported values: `VERBATIM`, `SMART`. If + unspecified, defaults to `VERBATIM` transcription. Mutually exclusive with + `timestamp_granularities` and `diarization_mode`. + """ timestamp_granularities: NotRequired[List[str]] r"""Optional. The granularity of timestamps to include in the transcription output. Supported values: \"word\". If empty, no timestamps are generated. @@ -69,6 +75,12 @@ class TranscriptionConfig(BaseModel): audio. If omitted or empty, defaults to automatic language detection. """ + mode: Optional[TranscriptionMode] = None + r"""Configures transcription mode. Supported values: `VERBATIM`, `SMART`. If + unspecified, defaults to `VERBATIM` transcription. Mutually exclusive with + `timestamp_granularities` and `diarization_mode`. + """ + timestamp_granularities: Optional[List[str]] = None r"""Optional. The granularity of timestamps to include in the transcription output. Supported values: \"word\". If empty, no timestamps are generated. @@ -82,6 +94,7 @@ def serialize_model(self, handler): "custom_vocabulary", "diarization_mode", "language_codes", + "mode", "timestamp_granularities", ] ) diff --git a/google/genai/_gaos/types/interactions/transcriptionmode.py b/google/genai/_gaos/types/interactions/transcriptionmode.py new file mode 100644 index 000000000..a78842a6e --- /dev/null +++ b/google/genai/_gaos/types/interactions/transcriptionmode.py @@ -0,0 +1,34 @@ +# Copyright 2026 Google LLC +# +# 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. +# +# pyformat: disable + +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .. import UnrecognizedStr +from typing import Literal, Union + + +TranscriptionMode = Union[ + Literal[ + "verbatim", + "smart", + ], + UnrecognizedStr, +] +r"""Configures transcription mode. Supported values: `VERBATIM`, `SMART`. If +unspecified, defaults to `VERBATIM` transcription. Mutually exclusive with +`timestamp_granularities` and `diarization_mode`. +"""