Skip to content

adrl-sven-kauber/silero-api-server

 
 

Repository files navigation

A simple FastAPI Server to run Silero TTS

Credit goes to the developers of Silero TTS
Silero PyTorch Page
Silero GitHub Page

This is primarily to serve the TTS extension in SillyTavern. The TTS module or server can be used any way you wish.

Installation

pip install silero-api-server

or, when using venv

python -m venv venv
source venv/bin/activate 
pip install -r requirements.txt

to leave the virtual environment, use the deactivate command.

Starting Server

python -m silero_api_server will run on default ip and port (0.0.0.0:8001)

usage: silero_api_server [-h] [-o HOST] [-p PORT]

Run Silero within a FastAPI application

options:
  -h, --help            show this help message and exit
  -o HOST, --host HOST
  -p PORT, --port PORT
  -r, --reload          Enable automatic reloading on file change

On first run of server, two operations occur automatically. These may take a minute or two.

  1. The model will be downloaded
  2. Voice samples will be generated.

API Docs

API Docs can be accessed from http://localhost:8001/docs

Voice Samples

Samples are served statically by the web server at /samples/{speaker}.wav or callable from the API from /tts/sample?speaker={speaker} endpoint.

Selecting Language

Download and set the desired language using POST /tts/language with payload {"id":"languageId"}
List of language ids are available via GET /tts/language

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%