from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from audio import audio_router from pydantic import BaseSettings, BaseModel from typing import List, Dict, Optional app = FastAPI(title="Text-to-Speech API", docs_url="/", description="the idea is to centralize all audio options at the moment", terms_of_service=" ", license_info={ "name": "MIT license", "url": "https://github.com/TartuNLP/text-to-speech-api/blob/main/LICENSE" }, contact={ "name": "Gleison Luiz", "url": "https://github.com/gleisonnanet", "email": "gleisonnanet@gmail.com", }) app.include_router(audio_router) app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_methods=["GET", "POST"], allow_headers=["*"], ) if __name__ == "__main__": import uvicorn uvicorn.run(app="main:app", host="0.0.0.0", port=7860, reload=True, timeout_keep_alive=None)