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

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
  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
  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:

  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.3.3.tar.gz (36.6 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.3.3-py3-none-any.whl (40.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sinapsis_speech-0.3.3.tar.gz
Algorithm Hash digest
SHA256 db965ff560292e6090f492741574c30240500eefcee32442d361ed8bc270415b
MD5 9241f4c06b216bcca8f4ff2f2dff8ed3
BLAKE2b-256 5c6d2186f7d68faeccb3a68f72d937e0fc3c603744558074e2b913a74d88096c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sinapsis_speech-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 423ba9f670f19e1cb26109648876304e287114a38f7a7edf9256e96685d7565a
MD5 30c7a58ca52412433dc3c97bb8e3af03
BLAKE2b-256 1c0807007f36e8528267bc1d3960f110857fb3fc9871c12e7d4b0cc8aa109336

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