Skip to content

Forward live audio language through SDK adapters - #1138

Merged
Baiju Meswani (baijumeswani) merged 1 commit into
mainfrom
baijumeswani/fix-asr-models
Sep 22, 2026
Merged

Baiju Meswani (baijumeswani) merged 1 commit into
mainfrom
baijumeswani/fix-asr-models

Conversation

@baijumeswani

Copy link
Copy Markdown
Collaborator

Description

PR #1064 added native handling for the live audio language option. However, the legacy SDK live audio sessions did not pass their language setting to the native request, so the native resolver could not use it.

This change forwards the language setting from the C#, JavaScript, Python, and Rust SDKs. The value is captured when the session starts and is passed as the lowercase language request option. When no language is set, the existing default behavior is unchanged.

The change also adds focused tests for the SDK adapters and updates the real-model streaming tests to exercise language forwarding in C++, C#, JavaScript, Python, and Rust.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 22, 2026 22:04
@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
foundry-local Ready Ready Preview Sep 22, 2026 10:05pm UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The adapters consistently forward the lowercase option and focused tests cover both configured and default behavior.

Review effort: Balanced
Findings: None

What changed in this PR

Forwards live-audio language settings through legacy SDK adapters to native request options while preserving default behavior.

Changes:

  • Adds language forwarding in C#, JavaScript, Python, and Rust.
  • Adds focused adapter tests for forwarding and unset-language behavior.
  • Updates real-model streaming tests to specify English explicitly.
File Description
sdk_v2/​rust/​tests/​integration/​live_audio_test.rs Exercises language forwarding in Rust integration testing.
sdk_v2/​rust/​src/​openai/​live_audio_session.rs Applies snapshotted language to native request options.
sdk_v2/​python/​test/​unit/​test_live_audio_session.py Verifies Python language forwarding and snapshot behavior.
sdk_v2/​python/​test/​integration/​test_live_audio.py Uses the streaming model fixture and explicit language.
sdk_v2/​python/​src/​foundry_local_sdk/​openai/​live_audio_session.py Forwards language through RequestOptions.
sdk_v2/​js/​test/​live-audio-session-adapter.test.ts Tests set and unset language handling.
sdk_v2/​js/​test/​live-audio-client.test.ts Adds language to real-model streaming coverage.
sdk_v2/​js/​src/​openai/​liveAudioSession.ts Passes the captured language to the request.
sdk_v2/​cs/​test/​FoundryLocal.Tests/​LiveAudioTranscriptionTests.cs Tests request construction and integration forwarding.
sdk_v2/​cs/​src/​OpenAI/​LiveAudioTranscriptionClient.cs Creates requests with snapshotted language options.
sdk_v2/​cpp/​test/​sdk_api/​streaming_audio_test.cc Exercises native streaming with a language option.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@baijumeswani
Baiju Meswani (baijumeswani) merged commit 1bfe32d into main Sep 22, 2026
61 checks passed
@baijumeswani
Baiju Meswani (baijumeswani) deleted the baijumeswani/fix-asr-models branch September 22, 2026 23:52

This branch was successfully deployed

1 active deployment
Preview bfb83d6e Deployed Sep 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants