STT audit: fix VAD event routing, add missing streaming session params, retry-safe transcribe body, document hand-patched files#1
Open
abhishekmishragithub wants to merge 3 commits into
Conversation
…ing session params, retry-safe transcribe body - Fix WS message dispatch: speech_ended events were delivered to the speech_started handler (presence-based checks could not tell them apart); route on the type field value instead. Verified against the live API. - Add typed streaming connect options from the current Pulse WS API: sentenceTimestamps, redactPii, redactPci, format, punctuate, capitalize, eouTimeoutMs, endpointing, diarize, keywords, itnNormalize, finalizeOnWords, maxWords. additionalProperty(...) entries are now forwarded as query params as an escape hatch for future params. - transcribePulse: use a byte[]-backed request body so the RetryInterceptor can re-send it; the previous one-shot InputStream body sent an empty body on 408/429/5xx retries (sync + async clients). - Guard disconnect() against NPE when connect() was never called. - examples/AzureStyleSttRecognizer.java: recognizing/recognized/canceled event-style adapter for teams migrating from the Azure Speech SDK.
…iles, README section - .fernignore (Python SDK convention) lists hand-written files and the four generated files carrying manual STT fixes, each with its upstream path (spec change in smallest-ai-documentation vs generator bug report to Fern). - README explains the SDK is manually generated (see .fern/metadata.json), not yet in the Fern CI pipeline, and the rules for regenerating safely. - gitignore temp/ (scratch clones used for coverage audits).
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.
What
Live-tested the STT surface (batch + realtime WebSocket) against api.smallest.ai and fixed what the audit found. All fixes verified against the live API before and after.
Bug fixes
Missing API coverage
The streaming connect options exposed only 5 of the session params the server supports. Added typed options for `keywords`, `eouTimeoutMs`, `endpointing`, `sentenceTimestamps`, `redactPii`, `redactPci`, `diarize`, `format`, `punctuate`, `capitalize`, `itnNormalize`, `finalizeOnWords`, `maxWords`. `additionalProperty(...)` entries are now forwarded as query params, so future server params work without an SDK release. All verified live (keywords boosting, eou_timeout_ms, sentence_timestamps/diarize confirmed active in responses).
New example
`examples/AzureStyleSttRecognizer.java`: recognizing/recognized/canceled/sessionStopped event adapter matching the Azure Speech SDK shape, for teams migrating an existing Azure STT integration.
Hand-written vs generated (maintenance model)
This SDK was generated manually with fern-java-sdk 4.13.0 from a dirty local checkout of smallest-ai-documentation@04f10a9 (see `.fern/metadata.json`). There is no `java-sdk` group in `generators.yml` yet, so nothing regenerates it in CI.
Following the smallest-python-sdk convention, this PR adds a `.fernignore` that separates:
The README gains a "Generation and maintenance" section with the rules: do not regenerate over `.fernignore`d files until their patches are upstreamed; end state is a `java-sdk` group in `fern/apis/unified/generators.yml` (github pull-request mode, like Python) and a `.fernignore` shrunk to hand-written files only.
Coverage audit (vs Python SDK)
Diffed all `waves` models and client methods against smallest-python-sdk: parity except the deliberately removed Lightning v2 TTS, and `sample_rate.py` (a hand-written Python file, not generator output). Java is ahead on STT: it has the VAD event message types Python lacks.
Testing