siri-say "Hello there"
siri-say "Hello there"

Speak text from the command line with any voice installed on macOS, including the Siri voices, either out loud or straight to an audio file.

siri-say "Hello there"

🔊 Listen with sound on: the clip is siri-say speaking “Hello there”.

Speak text from the command line with any voice installed on macOS, including the Siri voices, either out loud or straight to an audio file. The built-in say command cannot use the Siri voices; siri-say can.

siri-say --help

Install

Needs macOS with the Xcode command line tools (xcode-select --install). Nothing else: no packages, no runtime, no network access.

With Homebrew:

brew install marcomontalbano/tap/siri-say

Update later with brew upgrade siri-say.

Or with the install script:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/marcomontalbano/siri-say/main/install.sh)"

The installer checks that you are on macOS with the Swift toolchain available, puts the script in ~/.local/bin (override with SIRI_SAY_PREFIX), and tells you if that directory is not on your PATH. Pin a release with SIRI_SAY_REF=v0.1.0.

Update later with siri-say --update, which downloads the same file over the installed one and reports the version change. SIRI_SAY_REF works there too, so SIRI_SAY_REF=v0.1.0 siri-say --update pins or rolls back.

siri-say is a single #!/usr/bin/env swift script and writes nothing else, so uninstalling is rm on one file.

Usage

siri-say --help
option meaning
--list [prefix] list the installed Siri voices, your Personal Voice and the enhanced ones downloaded from System Settings, one per line as language identifier name quality, Siri voices marked [siri]. Filter by language prefix, e.g. --list en. Piped, it prints only the voice lines.
--list --all also list the built-in, lower-quality voices: compact, legacy, novelty and the robotic Eloquence ones.
--lang <code> speak with the best installed voice for a language, e.g. it or en-GB: Siri first, then enhanced, then the rest. Among equals, the voice set in System Settings for that language wins. Cannot be combined with --voice.
--voice <id> voice identifier from --list. Display names such as "Voce 2" do not resolve. Defaults to the system voice, the one set in System Settings > Accessibility > Spoken Content for your current language.
--rate <0.0-1.0> speech rate. Default 0.48, slightly under the system default.
--out <file> write to a file instead of speaking; - writes a WAV to stdout.
--play speak out loud, which is the default when --out is absent.
--help usage and examples.
--version print the version.
--manage-voices open System Settings on Spoken Content, where more voices can be downloaded. macOS has no API to download a voice from the command line.
--allow-personal-voice ask macOS for access to your Personal Voice, so --list shows it and --voice can use it.
--update replace the installed script with the latest published version.

With no text argument the text is read from stdin, so siri-say composes with other commands. Stdin is only consulted when it is piped or redirected; a bare invocation on a terminal prints the usage rather than blocking.

Output formats

The format follows the file extension:

extension format ~2 s sample
.m4a, .aac AAC, 128 kbps 91 KB
.wav 16-bit PCM 189 KB
.aiff, .aif 16-bit PCM, big-endian 189 KB
.caf Core Audio Format, the synthesiser’s own lossless 32-bit float 374 KB
- WAV on stdout n/a

.mp3 is not supported. macOS provides an MP3 decoder but no encoder, and siri-say has no external dependencies. Pipe through ffmpeg if you need MP3:

siri-say --out - "Hello there" | ffmpeg -i - hello.mp3

Examples

siri-say --list en | grep siri                         # English Siri voices
siri-say --lang it "Ciao"                              # best Italian voice
siri-say --voice com.apple.voice.super-compact.en-US.Samantha "Hello"
siri-say --rate 0.3 "Slowly, now"                      # slower than normal
siri-say --out notice.wav "The build has finished"     # lossless file
siri-say --out - "Hello" | ffmpeg -i - hello.mp3       # MP3, via ffmpeg
pbpaste | siri-say                                     # speak the clipboard
git log -1 --pretty=%s | siri-say                      # speak the last commit

Use from AI agents

--lang lets an agent speak without knowing which voices are installed: it only needs the language of the conversation. Paste this into your AGENTS.md, and adapt it freely to how you work:

## Voice

`siri-say --lang <code> "text"` speaks text aloud, with the best installed voice
for the language code (e.g. `it`, `en`, `fr-FR`). Use the code of the language
we're using. Keep it short, and never read out code, paths or secrets.

Run it in the background with its output discarded, so the command returns right
away instead of blocking until the speech ends:

```sh
siri-say --lang en "The build has finished" >/dev/null 2>&1 &
```

How it works

macOS ships high-quality neural Siri voices, but the built-in say command cannot use them: they are absent from say -v '?' and cannot be selected by name. They are not hidden from the framework, though. AVSpeechSynthesisVoice.speechVoices() returns them alongside the classic voices, and siri-say --list puts them first, marked [siri]:

siri-say --list en | grep siri
# en-US  com.apple.siri.natural.<name>  Voice 1  enhanced  [siri]

Siri voice identifiers always start with com.apple.siri.; the exact names differ per system and locale, so list yours rather than copying an identifier from here.

siri-say goes through AVSpeechSynthesizer directly, so every installed voice is available, and it can write the result to a file instead of only playing it.

Which Siri voices you have depends on your system language and on what is installed under System Settings → Accessibility → Spoken Content: click ⓘ next to System Voice, pick a language, click Voice, then the download icon next to a voice. siri-say --manage-voices opens that page. Run siri-say --list to see what is on your machine.

Personal Voice

A Personal Voice you created in System Settings → Accessibility → Personal Voice works too, once you allow access:

siri-say --allow-personal-voice   # shows a macOS dialog the first time
siri-say --list                   # your voice is listed under Personal
siri-say --voice com.apple.speech.personalvoice.<id> "Hello"

macOS grants access per app: the one siri-say runs from, such as your terminal, gets the permission, so run --allow-personal-voice once from each app that uses siri-say. --lang never picks your Personal Voice: speaking in your voice takes an explicit --voice.

Why it runs interpreted

The Siri voices are only exposed to Apple-signed processes. Running the source through swift works because the host process is Apple’s own swift-frontend. The identical code compiled with swift build receives a filtered voice list, and --voice com.apple.siri.natural.<name> fails with voice not found.

Signing does not work around it: an ad-hoc signature and a full .app bundle with an Info.plist both still get the filtered list, and the entitlement involved is Apple-private and cannot be self-granted.

A compiled build is therefore fine for the classic voices, but only the shebang script reaches the Siri ones, which is why that single file is what gets installed.

Development

git clone https://github.com/marcomontalbano/siri-say.git
cd siri-say
./Sources/siri-say/main.swift --list

The source file is executable on its own, with no wrapper and nothing to build. Symlink it onto your PATH to run it as siri-say while you work on it:

ln -s "$PWD/Sources/siri-say/main.swift" /usr/local/bin/siri-say

swift build -c release also works and produces .build/release/siri-say, which is useful as a type-check, though that binary cannot use the Siri voices for the reason in Why it runs interpreted.

Exit status

siri-say exits 0 on success, 1 on a runtime error (unknown voice, no audio, unsupported format, empty input), and 2 on invalid arguments.

Disclaimer

siri-say is an independent project, not affiliated with or endorsed by Apple Inc. It uses the public AVSpeechSynthesizer API. Apple, macOS and Siri are trademarks of Apple Inc.