Add Live Reference AEC browser sample - #305
Draft
kkchandi wants to merge 1 commit into
Draft
Conversation
Adds a browser (TypeScript + Vite) sample under javascript/live-reference-aec demonstrating Azure Voice Live Reference AEC (client-supplied echo cancellation reference), available at api-version 2026-07-15. The sample captures the microphone and a tap of the app's own TTS playback, interleaves them into stereo PCM16 (channel 0 = mic, channel 1 = reference) via an AudioWorklet, and streams that to the service so it cancels echo using the exact signal the speaker plays. It waits for the session.updated acknowledgement before streaming, supports barge-in, and surfaces server and response errors. The echo cancellation session fields are sent as a documented PLACEHOLDER object because the released @azure/ai-voicelive SDK (1.0.0) does not yet serialize them; swap for typed properties and pin that version when the EC-enabled GA SDK aligned with api-version 2026-07-15 ships. Also registers the sample in the root and javascript README indexes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 05e97991-c590-4f4c-88e5-72f7e2916564
kkchandi
force-pushed
the
add-client-ec-reference-sample
branch
from
July 24, 2026 22:41
8b444d4 to
96a1d07
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live Reference AEC (browser sample)
Adds a browser (TypeScript + Vite) sample under
javascript/live-reference-aec/demonstrating Azure Voice Live Reference AEC (client-supplied echo cancellation reference), available at REST api-version2026-07-15.What it does
The browser captures the microphone and a tap of the app's own TTS playback, interleaves them into stereo PCM16 (channel 0 = mic, channel 1 = reference) via an
AudioWorklet, and streams that to the service so it cancels echo against the exact signal the speaker plays. It waits for thesession.updatedacknowledgement before streaming, supports barge-in, and surfaces server and response errors.SDK note (why this stays draft)
The echo cancellation session fields (
reference_source,channels) are sent as a documented PLACEHOLDER object castas any, because the released@azure/ai-voiceliveSDK (1.0.0) does not yet serialize them (it strips them at runtime). The placeholder uses the SDK's camelCase keys, so once the GA SDK aligned with api-version2026-07-15ships, we pin that version, drop the cast for typed properties, and it works unchanged.This PR should not be merged until that GA SDK is released.
Included
README.md,index.html,src/(voiceAssistant.ts,echoCancellationAudio.ts,main.ts),public/stereo-interleaver.js,style.css,package.json,vite.config.ts,tsconfig.json,.gitignoreREADME.mdandjavascript/README.mdindexesValidation
npm run type-checkandnpm run buildpass on GA@azure/ai-voicelive@1.0.0