Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions google/genai/_gaos/resources/interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -201,6 +202,7 @@
"ToolChoiceConfig",
"ToolChoiceType",
"TranscriptionConfig",
"TranscriptionMode",
"URLCitation",
"URLContextCallArguments",
"URLContextCallStep",
Expand Down
3 changes: 3 additions & 0 deletions google/genai/_gaos/types/interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -732,6 +733,7 @@
"ToolParam",
"TranscriptionConfig",
"TranscriptionConfigParam",
"TranscriptionMode",
"Transform",
"TransformParam",
"URLCitation",
Expand Down Expand Up @@ -1117,6 +1119,7 @@
"ToolChoiceType": ".toolchoicetype",
"TranscriptionConfig": ".transcriptionconfig",
"TranscriptionConfigParam": ".transcriptionconfig",
"TranscriptionMode": ".transcriptionmode",
"URLCitation": ".urlcitation",
"URLCitationParam": ".urlcitation",
"URLContext": ".urlcontext",
Expand Down
13 changes: 13 additions & 0 deletions google/genai/_gaos/types/interactions/transcriptionconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -82,6 +94,7 @@ def serialize_model(self, handler):
"custom_vocabulary",
"diarization_mode",
"language_codes",
"mode",
"timestamp_granularities",
]
)
Expand Down
34 changes: 34 additions & 0 deletions google/genai/_gaos/types/interactions/transcriptionmode.py
Original file line number Diff line number Diff line change
@@ -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`.
"""
Loading