Skip to content

Natural TTS notifications via ntfy.sh using pocket-tts

Notifications You must be signed in to change notification settings

CoreyH/ntfy-speaker

Repository files navigation

ntfy-speaker

A lightweight text-to-speech notification listener that uses pocket-tts for natural-sounding voice synthesis.

Listens to an ntfy.sh topic and speaks notifications aloud. Runs in the Windows system tray.

Features

  • Natural-sounding TTS using Kyutai's pocket-tts (100M parameter model)
  • Runs on CPU with ~200ms latency
  • System tray icon with easy quit option
  • Auto-starts on Windows login

Installation

macOS (Simple)

macOS has excellent built-in TTS, so no heavy dependencies needed:

pip install requests
python ntfy-speaker-mac.py

To run on login, add to System Settings → General → Login Items, or create a Launch Agent.

Available voices: Samantha, Alex, Victoria, Karen, Daniel, Moira, Tessa (run say -v '?' to list all)

Windows

Prerequisites

  • Python 3.10+ with pip

Setup

# Install dependencies
pip install pocket-tts sounddevice requests pystray pillow

# Clone this repo
git clone https://github.com/CoreyH/ntfy-speaker.git
cd ntfy-speaker

Configuration

Edit ntfy-speaker-tray.pyw to change:

  • NTFY_TOPIC - Your ntfy.sh topic (generate a random one for privacy)
  • VOICE - TTS voice: alba, fantine, cosette, eponine, azelma (female) or marius, javert, jean (male)

Auto-start on Windows

Run the PowerShell script to create a startup shortcut:

powershell -ExecutionPolicy Bypass -File create-shortcut.ps1

Or manually copy start-ntfy-speaker.vbs to your Startup folder.

Usage

Start manually

pythonw ntfy-speaker-tray.pyw

Send a notification

From any machine with curl:

curl -d "Build finished" https://ntfy.sh/YOUR_TOPIC

You'll hear: "Build finished complete"

Integration examples

GitHub Actions:

- name: Notify completion
  if: always()
  run: curl -d "${{ github.workflow }}" https://ntfy.sh/YOUR_TOPIC

Shell alias:

alias notify='curl -d'
# Usage: notify "Task done" https://ntfy.sh/YOUR_TOPIC

License

MIT

About

Natural TTS notifications via ntfy.sh using pocket-tts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors