feat: transcriber DX improvements and RealTimeTranscriber rename - #232
Merged
Conversation
ccampbell-aai
force-pushed
the
ccampbell/dx-additive-fixes
branch
from
August 13, 2026 23:58
a5b98d7 to
8efc520
Compare
ccampbell-aai
force-pushed
the
ccampbell/api-key-constructors
branch
from
August 14, 2026 01:39
ab1a1ec to
8b1920a
Compare
ccampbell-aai
force-pushed
the
ccampbell/dx-additive-fixes
branch
from
August 14, 2026 01:39
8efc520 to
08db516
Compare
ccampbell-aai
marked this pull request as ready for review
August 14, 2026 01:49
ccampbell-aai
force-pushed
the
ccampbell/dx-additive-fixes
branch
2 times, most recently
from
August 14, 2026 01:57
6826c55 to
59ac7f5
Compare
ccampbell-aai
force-pushed
the
ccampbell/api-key-constructors
branch
from
August 14, 2026 01:57
8b1920a to
c280e07
Compare
aurpsis-aai
approved these changes
Aug 14, 2026
ccampbell-aai
force-pushed
the
ccampbell/dx-additive-fixes
branch
from
August 14, 2026 17:40
59ac7f5 to
4708588
Compare
Adds a "Choosing a transcriber" decision table to the README, and a class
docstring plus failure-contract docs (a failed transcription returns a
Transcript with status error, not an exception) on the job-API methods.
Guards the config type on all four transcribers, so passing a
SyncTranscriptionConfig to Transcriber (or the reverse) raises TypeError
naming both directions instead of failing obscurely downstream.
Unifies audio input handling on the sync Transcriber upload path
(os.PathLike, bytearray, file objects, TypeError for anything else) to
match the async twin, and adds an optional poll_timeout to transcribe,
transcribe_async, and AsyncTranscriber.transcribe.
Parses a bare {"error": ...} body in the sync API, exposes aai.streaming
via a lazy module __getattr__ so importing assemblyai no longer depends on
websockets, and renames the streaming surface to RealTime* with every
former Streaming* name kept as an alias of the same object.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ccampbell-aai
force-pushed
the
ccampbell/dx-additive-fixes
branch
2 times, most recently
from
August 14, 2026 18:25
1faa82e to
3aac013
Compare
MIGRATION.md covers what breaks moving from 0.x to 1.0.0 — LeMUR support and the audio-capture extras were removed — and the recommended pattern for everything that still works the old way: the RealTime* streaming names, the canonical top-level import paths, api_key= on constructors, async lifecycle, poll_timeout=, checking transcript.status, warm() plus keepalive_expiry, and pathlib.Path inputs. Linked from the README overview and install section. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ccampbell-aai
force-pushed
the
ccampbell/dx-additive-fixes
branch
from
August 14, 2026 18:35
3aac013 to
cc8b3c9
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.
Stacked on #231 (base is
ccampbell/api-key-constructors; retargets to master once that merges). Additive DX improvements across the transcribers plus the streaming rename. No existing behavior changes; all new parameters default to current behavior.SyncTranscriptionConfigtoTranscriber(or the reverse) raises aTypeErrornaming the right class at the constructor, config setter, and every transcribe call — instead of a bareAttributeErrordeep in request building.TranscriptionConfiggains a class docstring.Transcribernow acceptspathlib.Pathandbytearraylike its three siblings; unsupported input raisesunsupported audio input type: ...instead of a raw httpx error; type aliases match runtime.poll_timeout=(keyword-only, seconds, defaultNone= today's unbounded polling) onTranscriber.transcribe/transcribe_asyncandAsyncTranscriber.transcribe; on expiry raisesTranscriptErrornaming the transcript id and last status so it can be resumed viaget_by_id.status=errortranscript rather than raising._error_from_responsefalls back to a plain{"error": ...}body instead of degrading to "failed with status NNN".aai.streamingis reachable as an attribute via lazy import (nowebsocketscost atimport assemblyaitime).StreamingClient→RealTimeTranscriber, carried through the public streaming surface (AsyncRealTimeTranscriber,RealTimeTranscriberOptions,RealTimeParameters,RealTimeSessionParameters,RealTimeEvents,RealTimeError,RealTimeErrorCodes). Every formerStreaming*name remains a plain alias to the same object —isinstanceand identity hold in both directions, imports stay warning-free, and the 157 existing streaming tests run unmodified against the old names as compat coverage. README and CLAUDE.md updated to the new names with an alias note.Bumps the version to 1.0.0 — this PR is the major-release bump. (Written as exactly
1.0.0: PEP 440 normalizes away the trailing-.00house style, so av1.0.0release tag can only match this form.)Tests: full suite 463 passed (405 pre-existing untouched + 58 in
tests/unit/test_dx.py).Note for reviewers: the SDK historically shipped
RealtimeTranscriber(lowercase t) as the old v2 realtime client — the new name differs only in the capital T. Flagging for a deliberate call on whether that collision is acceptable before this lands.🤖 Generated with Claude Code