{"id":25242644,"url":"https://github.com/snowy-0wl/piper-mode","last_synced_at":"2026-04-30T03:33:44.108Z","repository":{"id":274715704,"uuid":"923761299","full_name":"snowy-0wl/piper-mode","owner":"snowy-0wl","description":"A vibe-coded text-to-speech for Emacs using the Piper TTS engine. Features natural-sounding voice synthesis, multiple voice commands, and automatic setup. Designed for macOS/Apple Silicon. ","archived":false,"fork":false,"pushed_at":"2025-12-04T18:35:26.000Z","size":131,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-08T02:15:26.163Z","etag":null,"topics":["accessibility","apple-silicon","emacs","emacs-lisp","emacs-package","macos","piper","speech-synthesis","text-to-speech","tts"],"latest_commit_sha":null,"homepage":"https://github.com/snowy-0wl/piper-mode","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snowy-0wl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-28T19:38:33.000Z","updated_at":"2025-12-04T18:35:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f51f46f-af77-4b0c-8dae-3b5991f9a38a","html_url":"https://github.com/snowy-0wl/piper-mode","commit_stats":null,"previous_names":["snowy-0wl/piper-mode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/snowy-0wl/piper-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowy-0wl%2Fpiper-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowy-0wl%2Fpiper-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowy-0wl%2Fpiper-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowy-0wl%2Fpiper-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snowy-0wl","download_url":"https://codeload.github.com/snowy-0wl/piper-mode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snowy-0wl%2Fpiper-mode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32453817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accessibility","apple-silicon","emacs","emacs-lisp","emacs-package","macos","piper","speech-synthesis","text-to-speech","tts"],"created_at":"2025-02-11T23:24:09.983Z","updated_at":"2026-04-30T03:33:40.322Z","avatar_url":"https://github.com/snowy-0wl.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"# piper-mode\n\nText-to-speech for Emacs using the [Piper TTS](https://github.com/rhasspy/piper) engine. Provides high-quality, natural-sounding speech synthesis.\n\n## System Requirements\n\n- macOS on Apple Silicon (M1/M2)\n- Homebrew (for dependencies)\n- Emacs 27.1 or later\n- `json` package 1.4 or later\n- `jq` 1.6 or later (required by `setup-piper.sh` for JSON state files)\n\n## Features \n\n- High-quality text-to-speech using Piper's neural TTS engine\n- Multiple voice commands:\n  - `M-x piper-speak` - Speak entered text\n  - `M-x piper-speak-region` - Speak the selected text\n  - `M-x piper-speak-buffer` - Speak the entire buffer\n  - `M-x piper-speak-paragraph` - Speak the current paragraph\n  - `M-x piper-speak-line` - Speak the current line\n  - `M-x piper-speak-word` - Speak the current word\n  - `M-x piper-speak-to-end` - Speak from point to end of buffer\n  - `M-x piper-stop` - Stop speaking and clean up\n  - `M-x piper-select-model` - Select and download a different voice model\n- Automatic setup and installation of dependencies\n- Support for custom voice models\n- Debug logging for troubleshooting\n- Temporary file management for audio output\n- Process management for TTS and audio playback\n\n## Installation\n\n### Using straight.el (Recommended)\n\nAdd this to your Emacs configuration:\n\n```elisp\n(use-package piper-mode\n  :straight (piper-mode\n            :type git\n            :host github\n            :repo \"snowy-0wl/piper-mode\"\n            :files (\"*.el\" \"bin\" \"models\" \"setup-piper.sh\"))\n  :config\n  (when (not (file-exists-p (expand-file-name \"models/en_US-joe-medium.onnx\"\n                                             (file-name-directory (locate-library \"piper-mode\")))))\n    (let ((default-directory (file-name-directory (locate-library \"piper-mode\"))))\n      (shell-command \"chmod +x setup-piper.sh\")\n      (shell-command \"./setup-piper.sh .\")))\n  (piper-mode))\n```\n\n### Manual Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/snowy-0wl/piper-mode.git\ncd piper-mode\n```\n\n2. Run the setup script:\n```bash\nchmod +x setup-piper.sh\n./setup-piper.sh .\n```\n\n3. Add to your Emacs configuration:\n```elisp\n(add-to-list 'load-path \"/path/to/piper-mode\")\n(require 'piper-mode)\n(piper-mode)\n```\n\n## Configuration\n\nThe package provides several customization options:\n\n```elisp\n;; Enable debug logging\n(setq piper-debug t)\n\n;; Set custom installation directory\n(setq piper-install-dir \"/path/to/custom/install\")\n\n;; Set default voice model (English - Joe Medium)\n(setq piper-voice-model (expand-file-name \"models/en_US-joe-medium.onnx\"\n                                        (file-name-directory (locate-library \"piper-mode\"))))\n\n;; Or use a different language model (e.g., Russian - Dmitri Medium)\n(setq piper-voice-model (expand-file-name \"models/ru_RU-dmitri-medium.onnx\"\n                                        (file-name-directory (locate-library \"piper-mode\"))))\n\n;; If using use-package, you can set it in :custom section\n(use-package piper-mode\n  :straight (piper-mode\n            :type git\n            :host github\n            :repo \"snowy-0wl/piper-mode\"\n            :files (\"*.el\" \"bin\" \"models\" \"setup-piper.sh\"))\n  :custom\n  (piper-voice-model (expand-file-name \"models/en_US-joe-medium.onnx\"\n                                     (file-name-directory (locate-library \"piper-mode\"))))\n  :config\n  (piper-mode))\n\n;; Change the URL for fetching available models (if needed)\n(setq piper-models-url \"https://raw.githubusercontent.com/rhasspy/piper/master/VOICES.md\")\n\n;; Adjust process timeout (default: 30 seconds)\n(setq piper-process-timeout 60)\n```\n\n### Voice Model Selection\n\nPiper-mode supports multiple voice models in different languages. To change the voice model:\n\n1. Use `M-x piper-select-model` to open the model selection interface\n2. Type to filter available models (e.g., \"russian\" or \"dmitri\")\n3. Select the desired model\n4. The model will be automatically downloaded if not present\n\nThe default model (en_US-joe-medium) will be used until you select a different one. Your model selection persists across Emacs sessions.\n\n## First-Time Setup\n\nThe setup script will automatically:\n1. Install required dependencies:\n   - onnxruntime via Homebrew (for neural network inference)\n   - sox via Homebrew (for audio playback)\n2. Build a forked version of espeak-ng from source (for text processing)\n3. Build Piper from source\n4. Download the default voice model (en_US-joe-medium, ~63MB)\n\nThis process may take a few minutes. Progress is logged to `setup.log` in the installation directory.\n\n### Directory Structure\n\nAfter installation, the following directory structure is created:\n- `bin/` - Contains executables and libraries\n  - `piper` - Main Piper executable\n  - `espeak-ng-data/` - Speech data files\n  - Various `.dylib` files for Piper, espeak-ng, and ONNX runtime\n- `models/` - Voice model files\n  - `en_US-joe-medium.onnx` - Default voice model\n  - `en_US-joe-medium.onnx.json` - Model configuration\n- `tmp/` - Temporary WAV files (automatically cleaned up)\n\n### Troubleshooting Setup\n\nIf setup fails:\n\n1. Check the setup log:\n```bash\ncat ~/.emacs.d/straight/build/piper-mode/setup.log  # If using straight.el\n# or\ncat /path/to/piper-mode/setup.log                   # If installed manually\n```\n\n2. Make sure Homebrew is installed and up to date:\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\nbrew update\n```\n\n3. Install dependencies manually:\n```bash\narch -arm64 brew install onnxruntime sox\n```\n\n4. Check file permissions:\n```bash\nchmod +x setup-piper.sh\nchmod +x bin/piper\n```\n\n5. Verify library paths:\n```bash\nls -l bin/*.dylib\n```\n\n6. Check if voice model exists:\n```bash\nls -l models/en_US-joe-medium.onnx\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. \n\n## License\n\nThis project is licensed under the GPL-3.0 License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowy-0wl%2Fpiper-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnowy-0wl%2Fpiper-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnowy-0wl%2Fpiper-mode/lists"}