Skip to content
Closed
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
10 changes: 9 additions & 1 deletion src/google/adk/agents/live_request_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,15 @@ def send_content(self, content: types.Content):
self._queue.put_nowait(LiveRequest(content=content))

def send_realtime(self, blob: types.Blob):
self._queue.put_nowait(LiveRequest(blob=blob))
# Fix for issue #5552: Ensure the audio blob always explicitly declares
# the correct MIME type to prevent "Invalid Audio Format" errors.
# This helps in cases where the MIME type might be implicitly lost
# or misinterpreted downstream.
corrected_blob = types.Blob(
mime_type="audio/pcm;rate=16000",
data=blob.data,
)
self._queue.put_nowait(LiveRequest(blob=corrected_blob))

def send_activity_start(self):
"""Sends an activity start signal to mark the beginning of user input."""
Expand Down