👧
Amica
Launch DemoTelegramGitHubTwitter
  • Welcome to Amica!
  • 🌸Overview
    • How Amica Works
    • Core Features
    • Amica Life
    • Emotion System
    • Other Features
    • Use Cases
    • Amica vs Other Tools
  • 🌳Getting Started
    • Quickstart Guide
    • Installing Amica
    • Next Steps
  • 🗣️Connecting LLMs (Your Core AI Chatbot Model)
    • Using LM Studio
    • Using LLaMA.cpp
    • Using Ollama
    • Using KoboldCpp
    • Using OpenAI
    • Using Oobabooga
    • Using OpenRouter
  • 🔊Connecting Speech Options (TTS)
    • Using SpeechT5
    • Using ElevenLabs
    • Using Coqui Local
    • Using Piper
    • Using Alltalk TTS
    • Using Kokoro TTS
    • Using RVC
  • 👂Connecting Microphone Options (STT)
    • Using whisper.cpp
  • 👁️Connecting Multi-Modal Modules
    • Using LLaVA
  • 🔧Other Guides
    • Using Window.ai
    • Using Moshi (Voice to Voice)
  • 🧩Plugin System
    • Plugins Intro
    • Getting Real World News on Amica
  • 🔌API System
    • External API for Agents
  • 🌻Tutorials
    • Creating new Avatars
    • Using Custom Assets
  • 🌺Contributing to Amica
    • Setting up your developer environment
    • Contributing to the Docs
    • Developing Amica
    • Adding Translations
Powered by GitBook
On this page
  • Setting Up Piper Locally
  • Make sure Piper is enabled for TTS:
Edit on GitHub
  1. Connecting Speech Options (TTS)

Using Piper

PreviousUsing Coqui LocalNextUsing Alltalk TTS

Last updated 7 months ago

Navigate to and follow the setup instructions below to run Piper locally as a TTS backend.

Setting Up Piper Locally

Method 1: Setup via Docker

  1. Clone the artibex/piper repository:

    git clone git@github.com:artibex/piper-http.git
  2. Navigate to the piper-http directory:

    cd piper-http
  3. Add CORS support by installing Flask CORS in the Dockerfile. To do this, locate the Dockerfile and add the following line:

    RUN pip install flask_cors
  4. Build the Piper Docker image:

    docker build -t http-piper .
  5. Run the Piper Docker container:

    docker run --name piper -p 5000:5000 piper
  6. To allow CORS within the Piper server, modify the http_server.py file inside the running Docker container:

    • Navigate to the piper-http container's files:

      docker exec -it piper /bin/bash
    • Locate the http_server.py file:

      cd /app/piper/src/python_run/piper
    • Edit http_server.py and add the following lines at the top to enable CORS:

      from flask_cors import CORS
      CORS(app)
  7. Save the changes and restart the Piper server inside the container:

    python3 http_server.py

Method 2: Manual Setup

  1. Clone the repository:

    git clone https://github.com/flukexp/PiperTTS-API-Wrapper.git
  2. Navigate to the project directory:

    cd PiperTTS-API-Wrapper
  3. Download piper, install Piper sample voices and start piper server:

    ./piper_installer.sh

Make sure Piper is enabled for TTS:

Settings -> Text-to-Speech -> TTS Backend -> Piper

Notes

  • Piper can be used as a local text-to-speech backend in your application.

For more details on models and configurations, refer to the official .

🔊
Piper
Piper GitHub repository