Add FastAPI server for OpenAI-compatible API
This adds a simple, OpenAI-compatible API server using FastAPI. It exposes the TTS functionality over HTTP endpoints, including /v1/audio/speech for easy integration with tools like Open WebUI.
Why is this change needed? This makes it much easier to use MeloTTS as a backend service in other applications without needing to write custom Python scripts.
How was it tested? The API was tested in a clean conda environment. All necessary dependencies were discovered and added to a requirements.txt file to ensure a smooth installation process. using Ubuntu 20.04 / Linux Mint 20 OS.
I see there is another excellent PR (#56) that also adds an API. This implementation is different, as it's designed to be run standalone without Docker, making it more accessible for users who may not be familiar with containerization.
A significant part of this contribution is also the tested requirements.txt file, which solves over a dozen missing dependencies from the base pip package and allows for a clean one-step installation. The documentation has also been written with a full, step-by-step guide for getting started and connecting to Open WebUI.