macOS native voice CLI — transcribe audio to text and synthesize speech.
voicecli transcribe /path/to/audio.m4avoicecli speak "Hello world"voicecli speak "Hello world" --output /path/to/output.aiffvoicecli speak /path/to/response.md --output /path/to/output.aiffecho "Hello world" | voicecli speak -
cat response.md | voicecli speak - --output response.aiffvoicecli voices--output <path>— Save audio to file instead of playing--voice <voice-id>— Use specific voice (seevoicecli voices)--rate <0.0-1.0>— Speech rate (default: 0.5)
The speak command auto-detects input type:
- Plain text:
voicecli speak "Hello world" - File path: If the argument is a readable file, it reads the file content
- Stdin (
-): Read from standard input for piping
First run of transcribe will prompt for Speech Recognition permission.
Check System Settings → Privacy & Security → Speech Recognition if denied.
swift build
swift build -c release # For release buildbrew tap acwilan/voicecli
brew install voicecliDownload the latest release from GitHub Releases:
curl -L https://github.com/acwilan/voicecli/releases/latest/download/voicecli-macos.tar.gz | tar xz
mv voicecli ~/.local/bin/ # or /usr/local/bin/git clone https://github.com/acwilan/voicecli.git
cd voicecli
swift build -c release
cp .build/release/voicecli ~/.local/bin/