Skip to content

Allow variadic positional sources for hand-picked batch transcription#203

Merged
alexkroman merged 2 commits into
mainfrom
claude/eloquent-mccarthy-uc8k0k
Jun 16, 2026
Merged

Allow variadic positional sources for hand-picked batch transcription#203
alexkroman merged 2 commits into
mainfrom
claude/eloquent-mccarthy-uc8k0k

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

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

  • Variadic positional argument: Changed source: str | None to sources: list[str] throughout the codebase, allowing assembly transcribe a.mp3 b.mp3 https://youtu.be/… syntax
  • Hand-picked batch mode: Added _explicit_sources() function that treats multiple positional arguments as an as-is batch list (deduplicated, order preserved, no per-source expansion)
  • Single-source path preservation: Introduced TranscribeOptions.single_source property that collapses 0 or 1 positional argument to the scalar value expected by single-source helpers, while 2+ sources route to batch
  • Updated help text and examples:
    • Help now describes passing "several sources" as a batch mode option
    • Added example: assembly transcribe a.mp3 https://youtu.be/dtp6b76pMak --concurrency 3
    • Clarified that multiple sources are taken literally without glob/feed expansion
  • Validation: Multiple sources with --sample is rejected; --from-stdin with positional sources is rejected
  • Documentation: Updated README and reference docs to show the new hand-picked list pattern as the primary batch mode alternative to --from-stdin

Implementation Details

  • expand_sources() now accepts sources: list[str] and checks len(sources) > 1 to trigger the new explicit batch path
  • Deduplication uses dict.fromkeys() to preserve insertion order
  • All call sites updated to pass opts.sources (a list) instead of opts.source (a scalar)
  • Snapshot tests updated to reflect new usage line and help text
  • New test coverage for multiple positional sources, deduplication, and rejection of conflicting flags

https://claude.ai/code/session_01TgxFBBqmAZGKV5ifpQdVgF

claude added 2 commits June 16, 2026 23:41
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
@alexkroman alexkroman enabled auto-merge June 16, 2026 23:48
@alexkroman alexkroman added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit 67c7ec1 Jun 16, 2026
19 checks passed
@alexkroman alexkroman deleted the claude/eloquent-mccarthy-uc8k0k branch June 16, 2026 23:56
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