feat: add AssemblyAI as a third transcription backend (v0.2.0)#17
Open
cristianorj22 wants to merge 1 commit into
Open
feat: add AssemblyAI as a third transcription backend (v0.2.0)#17cristianorj22 wants to merge 1 commit into
cristianorj22 wants to merge 1 commit into
Conversation
Third transcription option alongside Groq and OpenAI. Async client
(upload audio → create job → poll up to 30 min) wired into whisper.py
using stdlib only — no SDK dependency.
Auto-priority is cost-ascending: Groq (~\$0.04/h) → AssemblyAI
(~\$0.27/h) → OpenAI (~\$0.36/h). Users with a single key see no
behavior change; users with multiple keys now get the cheapest
available. Override with --whisper {groq|assemblyai|openai}.
AssemblyAI strengths: stronger PT-BR transcription, auto language
detection, much higher upload size ceiling than Groq/OpenAI's 25 MB.
setup.py env template, --check error message, installer prompts, and
SKILL.md (usage, fallback section, privacy notes, bundled-scripts list)
updated to cover the new backend.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fe3bba8 to
c7eb776
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.
Summary
scripts/whisper.py. Async client (upload → create job → poll up to 30 min), stdlib-only (no SDK dep) per the project's convention.$0.04/h) → AssemblyAI ($0.27/h) → OpenAI (~$0.36/h). Single-key users see no behavior change. Override with--whisper {groq|assemblyai|openai}.Files touched
scripts/whisper.py—_post_assemblyai()(upload → create → poll),_segments_from_assemblyai()chunks per-word into ~5s segments to match Whisper's segment shape so downstreamfilter_range/format_transcriptneed no changes. Priority chain inload_api_key()extended.scripts/setup.py— env template addsASSEMBLYAI_API_KEY,_have_api_key()includes the new key in the same priority order, installer prompts and--checkerror message updated.scripts/watch.py—--whisperchoices grew togroq|assemblyai|openaiwith cost-ascending help text.SKILL.md— usage section, transcription-fallback section, failure-mode hint, privacy notes, and bundled-scripts list now cover all three backends.CHANGELOG.md—[0.2.0]entry..claude-plugin/plugin.json— version0.1.2→0.2.0, description rewritten.Test plan
python -m py_compile scripts/whisper.py scripts/setup.py scripts/watch.py— cleanpython scripts/setup.py --jsonreturnsstatus: readywith new priority chain (single Groq key configured →whisper_backend: groq, no behavior regression)--whisper assemblyai(needs an AssemblyAI API key)bash scripts/build-skill.sh— release CI on tag push will run this; verify the bundle still respects the 200-file cap and single-SKILL.mdinvariants with the changesNotes
Bearerprefix), and upload is raw bytes (not multipart). Kept the AssemblyAI client path separate from the existing Whisper multipart path to keep each provider's quirks isolated.--no-whisperkeeps working as a kill switch for the entire transcription path.