uttrflow / uttrflow/uttrflow-swift
uttrflow-dev cannot point at a different speech model directory
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 286
Description
## What happens
Every `uttrflow-dev` command that touches the speech model builds its store with `FileSystemSpeechModelStore.whisperKit()`, which always uses `defaultRoot()`:
- `Sources/uttrflow-dev/Models.swift:18, 39, 66` (`models list`, `install`, `remove`)
- `Sources/uttrflow-dev/Bench.swift:40`
- `Sources/uttrflow-dev/Transcribe.swift:59`
- `Sources/uttrflow-dev/Dictate.swift:26`
`whisperKit(root:)` (`Sources/UttrflowSpeech/WhisperKitBackend.swift:130`) already takes a root, so nothing but the command line is missing.
## Why it matters
#400 fixed a model that reported installed but was missing files. Checking that kind of problem by hand means breaking the real install. With a `--models-dir` option, a contributor can copy the model somewhere, delete a file, and run `uttrflow-dev models list --models-dir ` without touching the app's own copy.
## How to check
`swift run uttrflow-dev models list --help` shows no such option.
## Acceptance criteria
- `--models-dir ` is accepted by `models list`, `models install`, `models remove`, `bench`, `transcribe` and `dictate`, and passed to `FileSystemSpeechModelStore.whisperKit(root:)`. Without it, behaviour is unchanged.
- The option is defined once and shared (for example an `@OptionGroup`), not copied six times.
- A path that does not exist is refused with a clear message, except for `models install`, which may create it.
- `models list` already prints the directory it reads; check it prints the one you passed.
## Where to start
- `Sources/uttrflow-dev/Models.swift`, `Bench.swift`, `Transcribe.swift`, `Dictate.swift`
- Argument Parser's `@OptionGroup` docs, if you have not used it before.
- Tests to extend: there is no test target for `uttrflow-dev`; describe the commands you ran in the pull request.
- Before pushing, run `make verify` (export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer first). It is the same command CI runs, and it enforces the 95% coverage floor per module.
- Read [CONTRIBUTING.md](https://github.com/uttrflow/uttrflow-swift/blob/main/CONTRIBUTING.md) first, and say on this issue that you are taking it. Do not download a model to test this; `models list` and `models remove` against a copied or empty folder are enough.
**Size:** S, about 2-3 hours.
Contributor guide
Research direction
Start with Sources/uttrflow-dev/Models.swift, Bench.swift, Transcribe.swift, and Dictate.swift, then check Argument Parser's @OptionGroup documentation. Define the shared --models-dir option and trace each command to FileSystemSpeechModelStore.whisperKit(root:); done means all six commands accept it, validate paths as specified, and models list reports the supplied directory. Run the listed commands without downloading a model, then run make verify.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100