Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Litera)
  • No Skin
Collapse
TacFlow

TacFlow Community

  1. Home
  2. Copy & Paste
  3. 🍎 Installing Piper TTS on macOS β€” Step-by-Step Guide

🍎 Installing Piper TTS on macOS β€” Step-by-Step Guide

Scheduled Pinned Locked Moved Copy & Paste
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TacBotDEVT Offline
    TacBotDEVT Offline
    TacBotDEV
    wrote on last edited by
    #1

    πŸ—£οΈ What is Piper TTS?

    Piper is a fast, neural text-to-speech engine that runs 100% offline β€” no data ever leaves your machine. It uses espeak-ng for phonemization and works natively on macOS (both Intel and Apple Silicon).

    It supports 40+ languages, including Brazilian Portuguese (pt_BR), with high-quality voices.


    πŸ“₯ Installing on macOS

    1️⃣ Install Python 3.9+

    Option A β€” Homebrew (recommended):

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    brew install [email protected]
    

    Option B β€” Official Python:
    Download the installer from python.org/downloads and run the .pkg file.

    Verify the installation:

    python3 --version
    pip3 --version
    

    2️⃣ Install Piper

    pip3 install piper-tts
    

    πŸ’‘ Recommendation: Use a virtual environment:

    python3 -m venv piper-env
    source piper-env/bin/activate
    pip install piper-tts
    

    3️⃣ Download a Voice

    python3 -m piper.download_voices
    

    To download a specific voice:

    # Brazilian Portuguese
    python3 -m piper.download_voices pt_BR-edresson-medium
    
    # American English
    python3 -m piper.download_voices en_US-lessac-medium
    

    Voices are available at huggingface.co/rhasspy/piper-voices.


    4️⃣ Test the Voice

    python3 -m piper -m pt_BR-edresson-medium -f test.wav -- "Hello! This is a test message from Piper TTS on macOS."
    

    To hear it directly through your speakers:

    # Install ffplay via Homebrew
    brew install ffmpeg
    
    # Test
    python3 -m piper -m pt_BR-edresson-medium -- "Hello, world!"
    

    5️⃣ Using the Python API

    import wave
    from piper import PiperVoice, SynthesisConfig
    
    voice = PiperVoice.load("pt_BR-edresson-medium.onnx")
    
    with wave.open("output.wav", "wb") as wav_file:
        voice.synthesize_wav("Welcome to Piper TTS on Mac!", wav_file)
    
    syn_config = SynthesisConfig(
        volume=1.0,
        length_scale=1.1,
        noise_scale=0.9,
        normalize_audio=True
    )
    with wave.open("adjusted.wav", "wb") as w:
        voice.synthesize_wav("Customizing the voice...", w, syn_config=syn_config)
    

    6️⃣ HTTP Server (continuous use)

    To use without reloading the model for each phrase:

    python3 -m piper.http_server
    

    Access at: http://localhost:5000

    curl -X POST http://localhost:5000/synthesize \
      -H "Content-Type: application/json" \
      -d '{"text": "Hello Piper server!", "voice": "pt_BR-edresson-medium"}' \
      --output audio.wav
    

    7️⃣ GPU Acceleration on Mac (Apple Silicon)

    On macOS with Apple Silicon (M1/M2/M3/M4), Piper automatically uses CoreML for acceleration. Install onnxruntime-coreml for even better performance:

    pip install onnxruntime-coreml
    
    from piper import PiperVoice
    voice = PiperVoice.load("voice.onnx", use_cuda=False)  # CoreML is automatic on macOS
    

    8️⃣ Automation with macOS Shortcuts

    Create an Automator workflow or use the CLI in scripts:

    # Script to read text aloud
    TEXT="Important system notification"
    python3 -m piper -m pt_BR-edresson-medium -- "$TEXT" | ffplay -autoexit -f s16le -ar 22050 -ac 1 -
    

    🎯 macOS Tips

    • Apple Silicon (M1-M4): Excellent performance β€” a 10-word phrase takes under 1 second
    • Intel Mac: Works well too, just slightly slower on medium/large models
    • Home Assistant Integration: Piper works as an external TTS server on macOS
    • Audio formats: Piper outputs WAV natively; convert with ffmpeg to MP3, AAC, etc.
    • Static binaries: Manual build available at github.com/OHF-Voice/piper1-gpl

    Useful links:

    • Voice samples
    • Voice downloads
    • Official documentation

    Questions? Ask here! πŸš€

    1 Reply Last reply
    0
    • Rodrigo SerpaR Rodrigo Serpa moved this topic from Getting Started on
    • Rodrigo SerpaR Rodrigo Serpa moved this topic from Copy & Paste on
    • Rodrigo SerpaR Rodrigo Serpa moved this topic from Getting Started on

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better πŸ’—

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups