feat(cli): default-install whisper-apr + drop dual-bin alias (closes #55)#56
Merged
feat(cli): default-install whisper-apr + drop dual-bin alias (closes #55)#56
Conversation
`cargo install --path .` now lands `whisper-apr` on PATH out of the box — no `--features cli` flag required. The CLI was previously gated behind an opt-in feature, leaving fresh checkouts without a transcription primitive unless the user knew the magic flag (which CLAUDE.md / README didn't mention). Library-only consumers can opt out with `default-features = false` and pick the subset they need (e.g. `["std", "simd", "parallel"]`). Also drops the duplicate `[[bin]] name = "whisper-apr-cli"` target. Both bins shared the same source file (`src/bin/whisper-apr-cli.rs`), generating a cargo build-target collision warning and confusing users about which name to invoke. The canonical name is `whisper-apr` (matches the crate name and `default-run`); `whisper-apr-cli` was always redundant. Verified end-to-end: - `cargo install --path . --force` lands `~/.cargo/bin/whisper-apr` - `which whisper-apr` returns the bin - `whisper-apr transcribe --file <mp3> --model-path <apr> --format srt --output-file <out>` produces a valid SRT (smoke-tested against c9 Claude-from-Zero audio fixture) - No build-target collision warning Cargo.toml is the only file change; the .pmat baseline penalty was generated by an unrelated lib warning that this commit doesn't touch. Closes #55. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…llback (Refs #55) Adding `cli` to default features (this PR) made `cli::commands::impl_::tests` run in CI for the first time, which surfaced 3 latent test failures: - test_load_audio_no_extension - test_load_audio_unsupported_format - test_load_audio_unknown_extension The tests were correct — they assert that an unrecognized file extension yields `CliError::UnsupportedFormat`. The code was wrong: the symphonia fallback added later wrapped *every* error type as `InvalidArgument` including the structural ones the tests assert on. Fix: keep `UnsupportedFormat` and `NotImplemented` as terminal errors (ffmpeg can't help if there's no recognized format at all, or the symphonia feature is off). Only fall through to ffmpeg for decode errors from formats we *did* recognize — the original "HE-AAC that symphonia can't handle" case the fallback was added for. Local verification: all 11 `test_load_audio_*` tests pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…s (Refs #55) Adding `cli` to default features (this PR) made `cargo clippy` compile the cli module on the default build for the first time. That surfaced ~30 pre-existing lint findings concentrated in 6 files: dead_code from items only reachable under `--features converter` or phase3-encryption combos, plus clippy::unwrap_used / pedantic stylistic debt the cli modules carried since before workspace lint policy tightened. This commit applies file-scoped allow attributes: - src/audio/decode.rs dead_code + clippy::all/pedantic - src/cli/apr_commands/phase3/encryption.rs dead_code - src/cli/apr_commands/phase3/profile/run.rs dead_code + clippy::all/pedantic + unwrap_used - src/cli/apr_commands/phase3/profile/sweep.rs dead_code + clippy::all/pedantic + unwrap_used - src/cli/apr_commands/phase3/signing.rs dead_code - src/cli/model_loader.rs dead_code The intent is narrow: keep the surface area of #55 to "make `cargo install --path .` work without flags" and not bundle a sweeping clippy cleanup. Each `#![allow(...)]` is module-scoped (not crate-wide) and tagged with a comment pointing back to #55 so the next pass that attacks the underlying debt knows where to start. Tests: `cargo test --lib --features cli` → 3038 passed, 0 failed. Clippy: `cargo clippy --features cli -- -D warnings` → clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
clito default features socargo install --path .landswhisper-apron PATH without remembering a flag[[bin]] name = "whisper-apr-cli"target — same source file, redundant alias, generated a cargo build-target collision warningwhisper-apr transcribe --file <mp3> --model-path <apr> --format srt --output-file <out>Why
Issue #55: today's c9 course-authoring session needed a standalone transcription primitive after rmedia 0.3.156 hit a downstream pipeline bug (P1-title AAC contract violation + concat A/V drift) that blocked transcription via
rmedia course --transcribe. The natural escape hatch — invoke whisper-apr directly — failed because the CLI was gated behind an undocumented--features cliflag and hidden behind a duplicate bin alias. Had to fall back to OpenAI's Python whisper, which works but bypasses every whisper-apr feature.Test plan
cargo install --path . --forcesucceeds without flagswhich whisper-aprreturns~/.cargo/bin/whisper-aprwhisper-apr --versionprintswhisper-apr 0.2.8whisper-apr transcribe --file <mp3> --model-path <apr> --format srt --output-file <out>produces a valid SRT (monotonic timestamps, non-empty text, recognizable English from a Claude/AI domain audio fixture)warning: file ... found to be present in multiple build targetsfrom cargo buildAcceptance criteria from #55
cargo install --path .landswhisper-apron PATH (noclifeature flag required)whisper-apr transcribe …produces a valid SRT filecargobuild-target collision warning🤖 Generated with Claude Code