Switch the dictation endpoint to /v1/transcribe - #107
Draft
aurpsis-aai wants to merge 1 commit into
Draft
Conversation
The dictation API now serves its routes under /v1 (unversioned paths remain as aliases). Pin the client and its tests to the versioned path. Co-Authored-By: Claude Fable 5 (Jeeves) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates Blurt’s dictation client and documentation to use AssemblyAI’s versioned dictation route (/v1/transcribe) instead of relying on the unversioned alias, keeping tests and docs aligned with the canonical endpoint.
Changes:
- Switch
AssemblyAITranscribertoPOST …/v1/transcribe. - Tighten transcriber tests to assert the exact versioned path (instead of suffix-matching).
- Update README / BLURTENGINE.md / AGENTS.md endpoint references to match
/v1/transcribe.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Sources/BlurtEngine/STT/AssemblyAITranscriber.swift | Updates the transcribe request URL (and in-file endpoint references) to /v1/transcribe. |
| Tests/BlurtEngineTests/AssemblyAITranscriberTests.swift | Pins request-path assertions to /v1/transcribe for POSTs. |
| README.md | Updates architecture documentation to reference the versioned dictation endpoint. |
| BLURTENGINE.md | Updates engine guide text to reference the versioned dictation endpoint. |
| AGENTS.md | Updates settled-decisions and pipeline documentation references to /v1/transcribe. |
Suppressed comments (1)
Sources/BlurtEngine/STT/AssemblyAITranscriber.swift:79
- As written, switching the request URL to
/v1/transcribemakes the app hard-fail with a 404 until the service deploy lands (as noted in the PR description). To make this safer to merge (and to reduce the blast radius if a staging/proxy environment only exposes the unversioned alias), consider retrying once against/transcribewhen the/v1/transcribecall returns HTTP 404. This keeps/v1as the primary canonical path while preserving compatibility during rollout/alias transitions.
var request = URLRequest(url: baseURL.appendingPathComponent("v1/transcribe"))
request.httpMethod = "POST"
// Bounds a stalled connection; see `requestTimeoutSeconds` for why an idle
// timeout is the right shape here.
request.timeoutInterval = Self.requestTimeoutSeconds
request.setValue(apiKey, forHTTPHeaderField: "Authorization")
request.setValue(
"multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
let body = multipartBody(pcm: pcm, config: config, boundary: boundary)
let audioDurationMs = SyncSTTLimits.durationMs(ofPCMBytes: pcm.count, rate: sampleRate)
let data = try await send(request, body: body, audioDurationMs: audioDurationMs)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Points
AssemblyAITranscriberatPOST /v1/transcribeinstead of the unversioned/transcribe, and pins the transcriber tests to the exact versioned path (they previously matched by suffix). Doc references in README / BLURTENGINE.md / AGENTS.md updated to match.No behavior change beyond the path: same request shape, same response handling, and the warm-up GET still targets the host root.
Why
The dictation API now serves its routes under
/v1, with unversioned paths kept as aliases (https://github.com/AssemblyAI/DeepLearning/pull/18726). Moving the client to the canonical path now means Blurt is unaffected if the unversioned aliases are ever retired.Merge order
Do not merge until the dictation service change is deployed to production — until then
dictation.assemblyai.com/v1/transcribe404s. The current app keeps working throughout via the unversioned alias, so there is no urgency.Verification
swift buildandswift format lintclean locally;scripts/check.sh --portablefails only in the pre-existingrelease.shself-tests (fails identically on cleanmainon this machine) — CIcheckis the gate.🤖 Generated with Claude Code