Skip to content

v2.0.0 — Wyoming Apple Speech: Siri TTS, project rename - #8

Merged
FI-153 merged 11 commits into
mainfrom
develop
Jul 18, 2026
Merged

FI-153 merged 11 commits into
mainfrom
develop

Conversation

@FI-153

@FI-153 FI-153 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Promotes the v2.0.0-beta2 line to stable and renames the project.

What's in it

  • Siri text-to-speech (streaming synthesis, pre-warmed worker pool, voice-compatibility filtering, graceful degradation) alongside the existing streaming STT
  • Project renamed wyoming-apple-stt → wyoming-apple-speech — package, formulas, launchd label, paths, URLs. Binaries apple-stt/apple-tts keep their names
  • README overhaul — one-line install, HomePod-class positioning, examples, troubleshooting table
  • Beta Homebrew channel plumbing (already exercised by v2.0.0-beta1/beta2)

Verification

  • Python 72/72, Swift 33/33, ruff + mypy clean after the rename
  • e2e verified against Home Assistant during the beta cycle

After merge: tag v2.0.0 on main → workflow publishes Formula/wyoming-apple-speech.rb to the tap; tap gets formula_renames.json for automatic migration.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VgEMUdF2PNywdnyfzn4E89

DerPicknicker and others added 11 commits July 11, 2026 12:41
Exposes macOS's private Siri text-to-speech engine over the Wyoming protocol
alongside existing STT, using only system-managed voices (System Settings →
Siri) since the frozen 2021 download catalog no longer loads on current
macOS. A worker pool keeps an engine pre-warmed at all times so synthesis
starts immediately, spawning a replacement worker in the background so
concurrent requests never wait on engine init. Both one-shot synthesize and
streaming synthesize-start/chunk/stop are supported with sentence-level
incremental synthesis.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Explain that macOS only keeps full voice bundles for voices selected at
least once, and describe the per-request worker scaling behavior with
measured latency/memory figures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
discoverSystemVoices deduped on language|name|version, but Home Assistant
keys a voice by name-language-footprint. A speaker shipped as multiple
model/version variants (e.g. damon en-US premium as both neural v1301 and
natural v5030) surfaced twice under the same voice_id. Dedup on
language|name|footprint instead, keeping the highest content version.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VgEMUdF2PNywdnyfzn4E89
Voices that force the "hydra" text frontend (frontend.cfg with
"force_hydra_fe": true — the en-US / en-GB / en-IN "nashville" family) init
and preheat fine but throw `map::at: key not found` on synthesize: that
frontend needs the shared com.apple.siri.tts.resource.<lang> bundle, which the
in-process engine can't load on macOS 26, and the failed call also poisons the
autorelease pool. Refuse such voices in voiceIsCompatibleWithSystemEngine so
discovery never advertises them to Home Assistant and the engine never loads
one. Verified on-device: en-AU/en-IE/en-ZA synthesize; en-US/en-GB/en-IN are
filtered out.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VgEMUdF2PNywdnyfzn4E89
Beta tags (vX.Y.Z-beta.N) now produce a GitHub prerelease and a separate
wyoming-apple-stt-beta formula (class WyomingAppleSttBeta) that coexists with,
and conflicts_with, the stable one, so a beta push never overwrites the stable
formula in the tap. release.yml branches on the -beta suffix; the formula
template gains {{CLASS}} and {{CONFLICTS}} placeholders filled per channel.
Also fixes the pre-existing depends_on ordering nit (macos before python).

A -beta suffix is used rather than @beta because Homebrew derives a formula's
Ruby class from its filename and only maps @ to AT before a digit
(python@3.12), so wyoming-apple-stt@beta would be an invalid class.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VgEMUdF2PNywdnyfzn4E89
Integrate the STT-streaming work (PR #4, now on develop) with the Siri TTS
feature. STT and TTS are complementary: the merged handler serves both the
transcribe/streaming-transcript flow and the synthesize/streaming-synthesis
flow, and __main__ wires up both an SttService and a TtsService, advertising
a streaming AsrProgram alongside the TtsProgram.

Conflicts resolved as a union in __main__.py and handler.py; docs (CLAUDE.md,
README.md) carry both feature descriptions; build-release-tarball.sh and
install.sh copy apple-tts and re-sign apple-stt for TCC.

Tests: Python 70/70, Swift 33/33, ruff + mypy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VgEMUdF2PNywdnyfzn4E89
When the apple-tts pool can't hand out a worker (e.g. the engine can't load a
voice because the launchd service lacks Full Disk Access to the Siri model
cache), the handler let TtsWorkerError propagate out of handle_event, crashing
the connection mid-stream. Home Assistant then received a half-open/empty audio
stream and ffmpeg failed with "invalid start code [0][0][0][0] in RIFF header".

Acquire the worker through a guarded _acquire_tts_worker() in both the
synthesize and synthesize-start paths: on failure it logs and returns False so
the caller emits a clean empty AudioStart/AudioStop envelope instead. _speak_text
skips when no worker is held and its replace+retry is fully guarded.

Also document the Full Disk Access requirement (install.sh NOTE + README), the
root cause behind the ffmpeg error, since neural Siri voices load their model
cache from the TCC-protected ~/Library/Group Containers/group.com.apple.SiriTTS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VgEMUdF2PNywdnyfzn4E89
Graceful TTS degradation + document Full Disk Access requirement
Merge pull request #5 from FI-153/develop
The server now speaks as well as listens, so "Apple STT" no longer covers
it. Renames the Python package, Homebrew formulas (+beta), launchd label,
config/log paths, and all URLs to wyoming-apple-speech. The apple-stt and
apple-tts binaries keep their per-function names. README is restructured
around a one-line install, HomePod-class positioning, examples, and a
troubleshooting table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VgEMUdF2PNywdnyfzn4E89
@FI-153
FI-153 merged commit 8d0c695 into main Jul 18, 2026
4 checks passed
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.

1 participant