Skip to content

Fix: Ensure consistent audio MIME type#5585

Open
9chait9 wants to merge 14 commits into
google:mainfrom
9chait9:fix/issue-5584
Open

Fix: Ensure consistent audio MIME type#5585
9chait9 wants to merge 14 commits into
google:mainfrom
9chait9:fix/issue-5584

Conversation

@9chait9

@9chait9 9chait9 commented May 4, 2026

Copy link
Copy Markdown

Fixes #5552

This PR addresses issue #5552 by ensuring that the LiveRequestQueue.send_realtime method consistently sets the audio MIME type. If a types.Blob is passed without an explicit mime_type, it will now default to 'audio/pcm;rate=16000'. Existing mime_type values will be preserved.

Testing Plan

  1. Set up a test environment: Configure the ADK with a LiveRequestQueue and a component that sends audio blobs.
  2. Scenario 1 (No explicit MIME type): Send an audio blob using LiveRequestQueue.send_realtime without specifying the mime_type in the types.Blob object.
  3. Verification 1: Inspect the outgoing request (e.g., using a network proxy or by logging within the LiveRequestQueue implementation) to confirm that the mime_type header or field for the audio blob is automatically set to 'audio/pcm;rate=16000'.
  4. Scenario 2 (Explicit MIME type): Send an audio blob using LiveRequestQueue.send_realtime with an explicitly provided mime_type (e.g., 'audio/opus').
  5. Verification 2: Inspect the outgoing request to confirm that the explicitly provided mime_type ('audio/opus') is preserved and used.

@adk-bot

adk-bot commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Response from ADK Triaging Agent

Hello @9chait9, thank you for creating this PR!

To help reviewers better understand and test your fix, could you please add a testing plan section to your PR description? Additionally, for bug fixes, providing logs or a screenshot demonstrating the fix would be very helpful.

This information will help reviewers to review your PR more efficiently. Thanks!

@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label May 4, 2026
@9chait9

9chait9 commented May 4, 2026

Copy link
Copy Markdown
Author

Hi @adk-bot, thank you for the feedback! A detailed testing plan has already been included in the PR description. You can find it under the 'Testing Plan' section. Regarding logs/screenshots, this is an internal fix related to MIME type handling, which isn't easily demonstrated with screenshots. If specific logs are needed, please let me know, and I can provide them.

@9chait9 9chait9 marked this pull request as ready for review May 4, 2026 12:40
@rohityan rohityan self-assigned this May 8, 2026
@rohityan

rohityan commented May 8, 2026

Copy link
Copy Markdown
Collaborator

Hi @9chait9, Thank you for your contribution! It appears you haven't yet signed the Contributor License Agreement (CLA). Please visit https://cla.developers.google.com/ to complete the signing process. Once the CLA is signed, we'll be able to proceed with the review of your PR. Thank you!

@rohityan rohityan added the request clarification [Status] The maintainer need clarification or more information from the author label May 8, 2026
@9chait9

9chait9 commented May 10, 2026

Copy link
Copy Markdown
Author

@rohityan I have already signed CLA.

@9chait9

9chait9 commented May 13, 2026

Copy link
Copy Markdown
Author

@rohityan Friendly ping

@rohityan

Copy link
Copy Markdown
Collaborator

Hi @9chait9 , can you please bring branch to main and fix the failing tests.

@9chait9

9chait9 commented May 29, 2026

Copy link
Copy Markdown
Author

@rohityan, I have addressed the failing checks and brought the PR up to date with the main branch. The PR is now ready for your review. Thank you for your time and guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

live [Component] This issue is related to live, voice and video chat request clarification [Status] The maintainer need clarification or more information from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persistent APIError: 1007 None (Invalid Audio Format) in google-adk 1.31.1 using Vertex AI Live API

3 participants