Skip to content

Synchronize real-time audio API names#692

Merged
kunal-vaishnavi merged 15 commits intomainfrom
kvaishnavi/sync-realtime-audio-api-names
May 4, 2026
Merged

Synchronize real-time audio API names#692
kunal-vaishnavi merged 15 commits intomainfrom
kvaishnavi/sync-realtime-audio-api-names

Conversation

@kunal-vaishnavi
Copy link
Copy Markdown
Contributor

Description

This PR standardizes the names of several real-time audio APIs across the Foundry Local SDK language bindings. It also removes an extra unused API in the JS SDK.

Motivation and Context

The API names and their usage should be similar across the language bindings. This ensures one language binding is not favored over another language binding due to API usage.

Copilot Summary

This pull request standardizes the naming of the real-time transcription stream method across all SDKs by renaming methods like GetTranscriptionStream, getTranscriptionStream, and get_transcription_stream to GetStream, getStream, and get_stream respectively. It also renames related files and updates all references in documentation, tests, and code to match the new naming. Additionally, C++ and JS client files are renamed for consistency. These changes improve API clarity and make the SDKs more consistent across languages.

SDK method and API renaming:

  • Renamed all real-time transcription stream methods to GetStream/getStream/get_stream in C#, JS, Python, and Rust SDKs, replacing previous names like GetTranscriptionStream and getTranscriptionStream. All usages and documentation references are updated accordingly.

File and import renaming for consistency:

  • Renamed C++ and JS client files from openai_live_audio_client.* and liveAudioTranscriptionClient.js to openai_live_audio_session.* and liveAudioSession.js, updating all includes/imports throughout the codebase.

Interface and API cleanup:

  • Removed the createLiveTranscriptionSession method from the JS IModel interface, reflecting the new naming and usage patterns.

These changes ensure a consistent and predictable developer experience across all supported languages.

Copilot AI review requested due to automatic review settings May 2, 2026 22:44
@vercel
Copy link
Copy Markdown

vercel Bot commented May 2, 2026

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

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment May 4, 2026 5:40pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Standardizes real-time audio transcription streaming API names across the Foundry Local SDK language bindings to provide a consistent developer experience, and aligns file/module naming around “live audio session”.

Changes:

  • Renames live audio stream retrieval methods to GetStream / get_stream (and updates call sites across tests/samples/docs).
  • Renames/refactors live-audio client/session modules and types files for consistency (e.g., live_audio_session, liveAudioSession, LiveAudioTypes).
  • Removes the JS IModel.createLiveTranscriptionSession surface from the interface.

Reviewed changes

Copilot reviewed 30 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/rust/tests/integration/live_audio_test.rs Updates integration test to use get_stream()
sdk/rust/src/openai/mod.rs Renames module export to live_audio_session
sdk/rust/src/openai/live_audio_session.rs Renames API/docs to get_stream()
sdk/rust/src/openai/audio_client.rs Updates import path for live audio session
sdk/python/test/openai/test_live_audio_transcription.py Updates test imports and get_stream() usage
sdk/python/src/openai/live_audio_types.py Introduces consolidated live-audio types module
sdk/python/src/openai/live_audio_session.py Renames generator API to get_stream() and updates docs
sdk/python/src/openai/audio_client.py Updates session import and sample usage to get_stream()
sdk/python/src/openai/init.py Re-exports from renamed live-audio modules
sdk/js/test/openai/liveAudioTranscription.test.ts Updates imports to renamed JS live-audio modules
sdk/js/src/openai/liveAudioTypes.ts Introduces consolidated live-audio types + parsing/helpers
sdk/js/src/openai/liveAudioSession.ts Updates types import to renamed module
sdk/js/src/openai/audioClient.ts Updates session import path
sdk/js/src/index.ts Updates public exports to renamed JS live-audio modules
sdk/js/src/imodel.ts Removes createLiveTranscriptionSession from IModel
sdk/js/src/detail/modelVariant.ts Updates live-audio session import path
sdk/js/src/detail/model.ts Updates live-audio session import path
sdk/cs/test/FoundryLocal.Tests/LiveAudioTranscriptionTests.cs Renames test usage to GetStream()
sdk/cs/src/OpenAI/LiveAudioTypes.cs Adds consolidated C# live-audio types implementation
sdk/cs/src/OpenAI/LiveAudioSession.cs Renames session API to GetStream() and updates docs
sdk/cs/README.md Updates docs to GetStream()
sdk/cpp/test/live_audio_test.cpp Updates include to openai_live_audio_session.h
sdk/cpp/src/openai_live_audio_session.cpp Updates include to session header
sdk/cpp/src/openai_audio_client.cpp Updates include to session header
sdk/cpp/include/openai/openai_live_audio_session.h Adds/renames C++ session header
sdk/cpp/include/foundry_local.h Updates public include to session header
sdk/cpp/CMakeLists.txt Updates build sources to openai_live_audio_session.cpp
samples/rust/live-audio-transcription/src/main.rs Updates sample to get_stream()
samples/python/live-audio-transcription/src/app.py Updates sample to get_stream()
samples/python/live-audio-transcription/README.md Updates sample docs to get_stream()
samples/js/live-audio-transcription/app.js Updates sample to getStream()
samples/js/live-audio-transcription/README.md Updates sample docs to getStream()
samples/cs/live-audio-transcription/README.md Updates sample docs to GetStream()
samples/cs/live-audio-transcription/Program.cs Updates sample to GetStream()
Comments suppressed due to low confidence (1)

sdk/js/src/openai/liveAudioSession.ts:3

  • LiveAudioTranscriptionSession still exposes getTranscriptionStream() (and related docs/error text), but the samples and PR goal indicate the API should be renamed to getStream(). As-is, session.getStream() calls in samples will fail at runtime/compile time. Please rename the method (and its references/messages) to getStream(), and consider keeping getTranscriptionStream() as a backwards-compatible alias/deprecation shim if this is a public API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdk/js/test/openai/liveAudioTranscription.test.ts
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Comment thread sdk/cpp/src/openai_audio_client.cpp Outdated
baijumeswani
baijumeswani previously approved these changes May 4, 2026
@kunal-vaishnavi kunal-vaishnavi enabled auto-merge (squash) May 4, 2026 18:17
@kunal-vaishnavi kunal-vaishnavi merged commit b379679 into main May 4, 2026
56 checks passed
@kunal-vaishnavi kunal-vaishnavi deleted the kvaishnavi/sync-realtime-audio-api-names branch May 4, 2026 19:09
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.

4 participants