Skip to content

Commit 74eb373

Browse files
Annhiluccopybara-github
authored andcommitted
feat: Add support for new audio MIME types: opus, alaw, and mulaw
PiperOrigin-RevId: 896670493
1 parent 7d61ae7 commit 74eb373

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

google/genai/_interactions/types/audio_content.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class AudioContent(BaseModel):
4545
"audio/mpeg",
4646
"audio/m4a",
4747
"audio/l16",
48+
"audio/opus",
49+
"audio/alaw",
50+
"audio/mulaw",
4851
]
4952
] = None
5053
"""The mime type of the audio."""

google/genai/_interactions/types/audio_content_param.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ class AudioContentParam(TypedDict, total=False):
4848
"audio/mpeg",
4949
"audio/m4a",
5050
"audio/l16",
51+
"audio/opus",
52+
"audio/alaw",
53+
"audio/mulaw",
5154
]
5255
"""The mime type of the audio."""
5356

google/genai/_interactions/types/content_delta.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ class DeltaAudio(BaseModel):
105105
"audio/mpeg",
106106
"audio/m4a",
107107
"audio/l16",
108+
"audio/opus",
109+
"audio/alaw",
110+
"audio/mulaw",
108111
]
109112
] = None
110113

0 commit comments

Comments
 (0)