Skip to content

Switch the dictation endpoint to /v1/transcribe - #107

Draft
aurpsis-aai wants to merge 1 commit into
mainfrom
aurpsis/dictation-v1-path
Draft

Switch the dictation endpoint to /v1/transcribe#107
aurpsis-aai wants to merge 1 commit into
mainfrom
aurpsis/dictation-v1-path

Conversation

@aurpsis-aai

Copy link
Copy Markdown
Contributor

What

Points AssemblyAITranscriber at POST /v1/transcribe instead 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/transcribe 404s. The current app keeps working throughout via the unversioned alias, so there is no urgency.

Verification

  • swift build and swift format lint clean locally; scripts/check.sh --portable fails only in the pre-existing release.sh self-tests (fails identically on clean main on this machine) — CI check is the gate.
  • Live verification against prod deferred until the service deploy (see merge order).

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings August 4, 2026 23:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 AssemblyAITranscriber to POST …/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/transcribe makes 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 /transcribe when the /v1/transcribe call returns HTTP 404. This keeps /v1 as 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.

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.

2 participants