feat(java): add streaming ASR SDK - #1120
Open
Mason Chen (jiec-msft) wants to merge 19 commits into
Open
Mason Chen (jiec-msft) wants to merge 19 commits into
Mason Chen (jiec-msft) wants to merge 19 commits into
Conversation
Add a Java 17 JNA binding for reusable-model PCM transcription, final results, cancellation, and deterministic cleanup. Package a normal Maven SDK and sources JAR while keeping native runtimes and model weights external. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build and test the Java 17 SDK from the team preview branch, derive a fixed version from the source tag, reject shaded JNA or Gson classes, and upload the exact first-party JAR with checksum evidence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move checkout, Java setup, and artifact upload to their current Node 24-based major versions so preview builds do not rely on deprecated action runtimes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The new cross-platform JNA ABI and concurrent native-resource lifecycle warrant final human validation despite extensive test coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Adds a Java 17 streaming-ASR SDK backed by JNA, with deterministic native ownership, validation, packaging, tests, and cross-platform CI.
Changes:
- Adds Java APIs for model management, PCM/WAV streaming, cancellation, results, and timing.
- Adds Maven packaging plus unit and native integration tests.
- Adds five-platform Azure validation and shared build-script integration.
| File | Description |
|---|---|
sdk_v2/java/THIRD_PARTY_NOTICES.md |
Documents JNA and external asset licensing. |
sdk_v2/java/src/test/java/com/microsoft/foundry/local/TranscriptionStateTest.java |
Tests transcription lifecycle races. |
sdk_v2/java/src/test/java/com/microsoft/foundry/local/NativeContractTest.java |
Validates ABI and native contracts. |
sdk_v2/java/src/test/java/com/microsoft/foundry/local/NativeAsrTest.java |
Adds opt-in native ASR integration coverage. |
sdk_v2/java/src/test/java/com/microsoft/foundry/local/AudioValidationTest.java |
Tests PCM, WAV, and configuration validation. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/WavAudio.java |
Implements bounded WAV parsing. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/TranscriptionTiming.java |
Defines transcription timing data. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/TranscriptionResult.java |
Defines final transcription results. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/Transcription.java |
Implements streaming request lifecycle. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/SpeechEvent.java |
Defines streaming speech events. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/PcmFormat.java |
Validates supported PCM input. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/NativeApi.java |
Provides the JNA C-ABI binding. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/ModelNotFoundException.java |
Adds exact-model lookup errors. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/ModelInfo.java |
Exposes immutable model metadata. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/Model.java |
Implements model operations and sessions. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/FoundryLocalManager.java |
Owns native manager resources. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/FoundryLocalException.java |
Exposes native error codes. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/Configuration.java |
Defines explicit runtime paths. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/Catalog.java |
Implements catalog queries. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/CancellationToken.java |
Adds download cancellation. |
sdk_v2/java/src/main/java/com/microsoft/foundry/local/AudioSession.java |
Manages sequential ASR requests. |
sdk_v2/java/README.md |
Documents setup and usage. |
sdk_v2/java/pom.xml |
Configures Maven build and packaging. |
sdk_v2/java/build.ps1 |
Adds reproducible Java builds. |
sdk_v2/java/.gitignore |
Excludes Java build outputs. |
sdk_v2/DEVELOPMENT.md |
Adds Java prerequisites and workflow. |
sdk_v2/build_and_test_all.ps1 |
Integrates Java verification. |
.pipelines/templates/steps-resolve-java.yml |
Resolves JDK 17 by architecture. |
.pipelines/templates/steps-build-java.yml |
Builds and native-tests Java. |
.pipelines/templates/steps-bootstrap-maven.yml |
Bootstraps pinned Maven. |
.pipelines/templates/stages-sdk-v2.yml |
Adds the Java pipeline stage. |
.pipelines/templates/stages-java.yml |
Defines five-platform Java CI. |
.pipelines/templates/fetch-models-from-artifacts-feed.yml |
Supports targeted ASR model fetching. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The 1ES Guardian integration reports gdn.unknownFormatResult for the generated SpotBugs report instead of actionable findings. Disable that scanner with the required justification so Java bundle packaging can complete. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Adds a Java 17 SDK for Foundry Local streaming ASR through JNA.
The existing preview release remains unchanged.
Earlier PRs: #1094 and #1100.
Supersedes #1113 to run from a branch in this repository.