From 74eb373b2e97291e1d07cedce7cbf1fb82123a18 Mon Sep 17 00:00:00 2001 From: Annie Luc Date: Wed, 8 Apr 2026 13:28:47 -0700 Subject: [PATCH] feat: Add support for new audio MIME types: opus, alaw, and mulaw PiperOrigin-RevId: 896670493 --- google/genai/_interactions/types/audio_content.py | 3 +++ google/genai/_interactions/types/audio_content_param.py | 3 +++ google/genai/_interactions/types/content_delta.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/google/genai/_interactions/types/audio_content.py b/google/genai/_interactions/types/audio_content.py index 0bd815410..898847a83 100644 --- a/google/genai/_interactions/types/audio_content.py +++ b/google/genai/_interactions/types/audio_content.py @@ -45,6 +45,9 @@ class AudioContent(BaseModel): "audio/mpeg", "audio/m4a", "audio/l16", + "audio/opus", + "audio/alaw", + "audio/mulaw", ] ] = None """The mime type of the audio.""" diff --git a/google/genai/_interactions/types/audio_content_param.py b/google/genai/_interactions/types/audio_content_param.py index 617374788..5f9d69074 100644 --- a/google/genai/_interactions/types/audio_content_param.py +++ b/google/genai/_interactions/types/audio_content_param.py @@ -48,6 +48,9 @@ class AudioContentParam(TypedDict, total=False): "audio/mpeg", "audio/m4a", "audio/l16", + "audio/opus", + "audio/alaw", + "audio/mulaw", ] """The mime type of the audio.""" diff --git a/google/genai/_interactions/types/content_delta.py b/google/genai/_interactions/types/content_delta.py index 105e17cf2..415aef316 100644 --- a/google/genai/_interactions/types/content_delta.py +++ b/google/genai/_interactions/types/content_delta.py @@ -105,6 +105,9 @@ class DeltaAudio(BaseModel): "audio/mpeg", "audio/m4a", "audio/l16", + "audio/opus", + "audio/alaw", + "audio/mulaw", ] ] = None