# README
Azure TTS cache
A small utility to cache the audio files generated by the Azure Text-to-Speech service.
Usage
- Build and run the service (default port is :8080 or specify with
PORT
environment variable) - Make an http request to
/tts
with the following body:
{
"text": "Hello world!",
"language": "en-US",
"name": "en-US-BrianNeural",
"style": "chat",
"gender": "Female",
"azureRegion": "<region where your azure TTS instance is>",
"azureKey": "<your azure TTS key>",
"shouldCache": true // if set to false, the audio will be cached for 5 minutes, otherwise it will be cached indefinitely
}
- Make a GET request to
/status
to see the status and memory usage of the cache
Configuration
Environment variables:
PORT
: the port the service will listen onPERSIST_CACHE
: save cache to file, default is true, if set to false the cache will be in-memory only