Skip to content

Exclude piper speaker from macOS builds#699

Merged
dharmab merged 1 commit into
mainfrom
exclude-piper-from-macos
Jun 10, 2026
Merged

Exclude piper speaker from macOS builds#699
dharmab merged 1 commit into
mainfrom
exclude-piper-from-macos

Conversation

@dharmab

@dharmab dharmab commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds //go:build !darwin to pkg/synthesizer/speakers/piper.go so the piper speaker and its embedded voice assets are not compiled into macOS binaries
  • Adds pkg/synthesizer/speakers/piper_darwin.go — a minimal stub that satisfies the compiler without importing piper dependencies
  • Reduces the macOS ARM64 binary from 159 MB → 29 MB (82% smaller)

On macOS, internal/application/app.go always selects NewMacOSSpeaker at runtime; piper code was dead weight.

🤖 Generated with Claude Code

On macOS, piper is never used — the runtime selects macOS Speech
Synthesis instead. Adding //go:build !darwin to piper.go prevents
the piper binary and embedded voice assets from being linked into
the macOS binary, reducing it from 159 MB to 29 MB (82% smaller).

A minimal stub in piper_darwin.go satisfies the compiler without
importing any piper dependencies.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dharmab dharmab merged commit 92ca9fc into main Jun 10, 2026
8 checks passed
@dharmab dharmab deleted the exclude-piper-from-macos branch June 10, 2026 00:59
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