Allow variadic positional sources for hand-picked batch transcription#203
Merged
Conversation
Make the transcribe SOURCE argument variadic so a hand-picked list of files/URLs can be batched straight on the command line — the clean alternative to piping them through --from-stdin: assembly transcribe a.mp3 https://youtu.be/… --concurrency 3 \ --llm '…' --llm-reduce '…' Two or more positional sources route to batch mode and are taken literally (deduped, order kept; no per-source glob/directory/feed expansion, since the user already enumerated exactly what to run). A lone source, directory, glob, bucket folder, or feed URL behaves exactly as before. --from-stdin and --sample stay mutually exclusive with positional sources. The TranscribeOptions.source scalar becomes a sources list with a single_source helper that collapses the 0/1 case for the single-source path; expand_sources/_stdin_sources now take the list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgxFBBqmAZGKV5ifpQdVgF
Show the positional-source batch form with a per-source --llm map and a cross-source --llm-reduce on a stronger --model. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgxFBBqmAZGKV5ifpQdVgF
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
Enable users to pass multiple audio sources directly on the command line for batch transcription, eliminating the need to pipe a list via
--from-stdin. The positional argument is now variadic ([SOURCES]...), and two or more sources automatically trigger batch mode with each source taken literally (no glob expansion or feed probing).Key Changes
source: str | Nonetosources: list[str]throughout the codebase, allowingassembly transcribe a.mp3 b.mp3 https://youtu.be/…syntax_explicit_sources()function that treats multiple positional arguments as an as-is batch list (deduplicated, order preserved, no per-source expansion)TranscribeOptions.single_sourceproperty that collapses 0 or 1 positional argument to the scalar value expected by single-source helpers, while 2+ sources route to batchassembly transcribe a.mp3 https://youtu.be/dtp6b76pMak --concurrency 3--sampleis rejected;--from-stdinwith positional sources is rejected--from-stdinImplementation Details
expand_sources()now acceptssources: list[str]and checkslen(sources) > 1to trigger the new explicit batch pathdict.fromkeys()to preserve insertion orderopts.sources(a list) instead ofopts.source(a scalar)https://claude.ai/code/session_01TgxFBBqmAZGKV5ifpQdVgF