Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

yogstation13/yogs-tts

Repository files navigation

Piper logo with SS13 logo

This project is archived as of August 13th, 2024. As of the date specified it is still functional, although it requires changes on your end.

See yogstation13/Yogstation#21008 for the way it was implemented on Yogstation13.

Written for Yogstation13

Written in nestjs

Uses piper, which can be found in ./piper-src

Piper voice models are individually licensed, please see MODEL_CARD under each voice folder (located in ./piper-voices) to view attributions and licensing.

For additional voices see here.

For a model training guide & video tutorial see here.

Compiling & Testing

You will require Docker

To compile & start the server, run docker compose up --build

Exposes on port 8133

API usage:

Ping

GET

/ping

Requires no auth

returns "Hello, world!"

POST

/tts_clear_cache

Auth key should be send in header Authorization : mysecurekey

Clears out the backend cache of voices, should be used at the start of each round. Cache is expected to reach up to 1GB on particularly active rounds.

TTS'

GET

/tts?model={desired_model}&pitch={multiplier}

Auth key should be send in header Authorization : mysecurekey

Message and filters should be in JSON body {message: "Hello, world!", "filters":{"robotic":["roundstart"]}

Models can be found in ./piper-voices and should be queried as country-name i.e. GB-alba

Example usage: /tts?model=US-joe&pitch=1