Skip to main content

Generate speech using various libraries.

Project description



Sinapsis Speech

Templates for a wide range of voice generation tasks.

🐍 Installation📦 Packages🌐 Webapps📙 Documentation🔍 License

🐍 Installation

[!IMPORTANT] Sinapsis projects requires Python 3.10 or higher.

This repo includes packages for performing speech synthesis using different tools:

  • sinapsis-elevenlabs
  • sinapsis-f5-tts
  • sinapsis-kokoro
  • sinapsis-zonos
  • sinapsis-orpheus-cpp
  • sinapsis-parakeet

Install using your preferred package manager. We strongly recommend using uv. To install uv, refer to the official documentation.

Install with uv:

uv pip install sinapsis-elevenlabs --extra-index-url https://pypi.sinapsis.tech

Or with raw pip:

pip install sinapsis-elevenlabs --extra-index-url https://pypi.sinapsis.tech

Replace sinapsis-elevenlabs with the name of the package you intend to install.

[!IMPORTANT] Templates in each package may require additional dependencies. For development, we recommend installing the package all optional dependencies:

With uv:

uv pip install sinapsis-elevenlabs[all] --extra-index-url https://pypi.sinapsis.tech

Or with raw pip:

pip install sinapsis-elevenlabs[all] --extra-index-url https://pypi.sinapsis.tech

Be sure to substitute sinapsis-elevenlabs with the appropriate package name.

[!TIP] You can also install all the packages within this project:

uv pip install sinapsis-speech[all] --extra-index-url https://pypi.sinapsis.tech

📦 Packages

This repository is organized into modular packages, each designed for integration with different text-to-speech tools. These packages provide ready-to-use templates for speech synthesis. Below is an overview of the available packages:

Sinapsis ElevenLabs

This package offers a suite of templates and utilities designed for effortless integrating, configuration, and execution of text-to-speech (TTS) and voice generation functionalities powered by ElevenLabs.

  • ElevenLabsTTS: Template for converting text into speech using ElevenLabs' voice models.

  • ElevenLabsVoiceGeneration: Template for generating custom synthetic voices based on user-provided descriptions.

For specific instructions and further details, see the README.md.

Sinapsis F5-TTS

This package provides a template for seamlessly integrating, configuring, and running text-to-speech (TTS) functionalities powered by F5TTS.

  • F5TTSInference: Converts text to speech using the F5TTS model with voice cloning capabilities.

For specific instructions and further details, see the README.md.

Sinapsis Kokoro

This package provides a single template for integrating, configuring, and running text-to-speech (TTS) synthesis using the Kokoro 82M v1.0 model.

KokoroTTS: Converts text to speech using the Kokoro TTS model. The template processes text packets from the input container, generates corresponding audio using Kokoro, and adds the resulting audio packets to the container. For specific instructions and further details, see the README.md.

Sinapsis Zonos

This package provides a single template for integrating, configuring, and running text-to-speech (TTS) and voice cloning functionalities powered by Zonos.

  • ZonosTTS: Template for converting text to speech or performing voice cloning based on the presence of an audio sample.​

For specific instructions and further details, see the README.md.

🌐 Webapps

The webapps included in this project showcase the modularity of the templates, in this case for speech generation tasks.

[!IMPORTANT] To run the app you first need to clone this repository:

git clone git@github.com:Sinapsis-ai/sinapsis-speech.git
cd sinapsis-speech

[!NOTE] If you'd like to enable external app sharing in Gradio, export GRADIO_SHARE_APP=True

[!IMPORTANT] Elevenlabs requires an API key to run any inference. To get started, visit the official website and create an account. If you already have an account, go to the API keys page to generate a token.

[!IMPORTANT] Set your env var using export ELEVENLABS_API_KEY='your-api-key'

[!IMPORTANT] F5-TTS requires a reference audio file for voice cloning. Make sure you have a reference audio file in the artifacts directory.

[!NOTE] Agent configuration can be changed through the AGENT_CONFIG_PATH env var. You can check the available configurations in each package configs folder.

🐳 Docker

IMPORTANT: This Docker image depends on the sinapsis-nvidia:base image. For detailed instructions, please refer to the Sinapsis README.

  1. Build the sinapsis-speech image:
docker compose -f docker/compose.yaml build
  1. Start the app container:
  • For ElevenLabs:
docker compose -f docker/compose_apps.yaml up -d sinapsis-elevenlabs
  • For F5-TTS:
docker compose -f docker/compose_apps.yaml up -d sinapsis-f5_tts
  • For Kokoro:
docker compose -f docker/compose_apps.yaml up -d sinapsis-kokoro
  • For Zonos:
docker compose -f docker/compose_apps.yaml up -d sinapsis-zonos
  • For Orpheus-CPP:
docker compose -f docker/compose_apps.yaml up -d sinapsis-orpheus-tts
  • For Parakeet:
docker compose -f docker/compose_apps.yaml up -d sinapsis-parakeet
  1. Check the logs
  • For ElevenLabs:
docker logs -f sinapsis-elevenlabs
  • For F5-TTS:
docker logs -f sinapsis-f5tts
  • For Kokoro:
docker logs -f sinapsis-kokoro
  • For Zonos:
docker logs -f sinapsis-zonos
  • For Orpheus-CPP:
docker logs -f sinapsis-orpheus-tts
  • For Parakeet:
docker logs -f sinapsis-parakeet
  1. The logs will display the URL to access the webapp, e.g.,::
Running on local URL:  http://127.0.0.1:7860

NOTE: The url may be different, check the output of logs. 5. To stop the app:

docker compose -f docker/compose_apps.yaml down
💻 UV

To run the webapp using the uv package manager, follow these steps:

[!IMPORTANT] If you're using sinapsis-orpheus-cpp, you need to export cuda environment variables:

export CMAKE_ARGS="-DGGML_CUDA=on"
export FORCE_CMAKE="1"
export CUDACXX=$(command -v nvcc)
  1. Sync the virtual environment:
uv sync --frozen
  1. Install the wheel:
uv pip install sinapsis-speech[all] --extra-index-url https://pypi.sinapsis.tech
  1. Run the webapp:
  • For ElevenLabs:
uv run webapps/generic_tts_apps/elevenlabs_tts_app.py
  • For F5-TTS:
uv run webapps/packet_tts_apps/f5_tts_app.py
  • For Kokoro:
uv run webapps/packet_tts_apps/kokoro_tts_app.py
  • For Zonos:
uv run webapps/generic_tts_apps/zonos_tts_app.py
  1. The terminal will display the URL to access the webapp (e.g.):
Running on local URL:  http://127.0.0.1:7860

NOTE: The URL may vary; check the terminal output for the correct address.

📙 Documentation

Documentation is available on the sinapsis website

Tutorials for different projects within sinapsis are available at sinapsis tutorials page

🔍 License

This project is licensed under the AGPLv3 license, which encourages open collaboration and sharing. For more details, please refer to the LICENSE file.

For commercial use, please refer to our official Sinapsis website for information on obtaining a commercial license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sinapsis_speech-0.4.0.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sinapsis_speech-0.4.0-py3-none-any.whl (53.1 kB view details)

Uploaded Python 3

File details

Details for the file sinapsis_speech-0.4.0.tar.gz.

File metadata

  • Download URL: sinapsis_speech-0.4.0.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.16

File hashes

Hashes for sinapsis_speech-0.4.0.tar.gz
Algorithm Hash digest
SHA256 79c1d54015cb9d74823259a0699912022aa9dab7e8c293757dc85ca9317e5cef
MD5 93fa442b4211fd0433c1f7c0ffc4d30d
BLAKE2b-256 bb7724d56e0863fe6e18baa50d6b80c2f1ee52dcfd8193f88e56c5e930ebd8e2

See more details on using hashes here.

File details

Details for the file sinapsis_speech-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sinapsis_speech-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 497dffa6e2385c21c6c5548c358ece930df2fa76b32702592c5c2bd8bc1a83ea
MD5 e6f7ce43f6ed23ca9a50bea8359a20fb
BLAKE2b-256 48d72ad381b627e3bdfbe1aca7cd93e99baaf955b3b63476f6c151d18f94a1e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page