File size: 1,085 Bytes
9850062
 
 
 
 
 
f884fe1
9850062
 
 
f884fe1
51b3a54
 
9850062
 
 
 
 
51b3a54
 
 
9850062
 
 
 
 
 
 
 
 
 
 
 
0a58fb3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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": "[email protected]",
              })

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)