Skip to main content

A simple FastAPI server to host Silero TTS

Project description

A simple FastAPI Server to run Silero TTS

Silero PyTorch Page Silero GitHub Page

Installation

Recommended to use venv. You can install using the following commands. Change the script name if you are installing from cmd or bash

py -m venv .\venv
.\venv\scripts\Activate.ps1
pip install -r requirements.txt

Configuration

The server runs on localhost:8001 by default. You can leave IP at 0.0.0.0 to listen on all IPs. Ports will be updated in the run script. Port and hostname will be updated in .env file.

On first run of server, the model will need to be downloaded, this will happen automatically and may take a few minutes depending on your connection speed.

Starting Server

Enter the venv .\venv\scripts\Activate.ps1 Execute the included run.ps1 or run.sh You can access the API spec at http://localhost:8001/docs

Voice Samples

Samples must be generated by a POST command to /generate-samples (easy way to run is from http://localhost:8001/docs) Samples are served statically by the web server at /samples/{speaker}.wav or callable from the API from /tts/sample?speaker={speaker} endpoint.

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

silero_api_server-0.1.4.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

silero_api_server-0.1.4-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

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