feat: 添加TTS语音合成功能 - Edge TTS方案完整实现,ChatTTS预留接口
This commit is contained in:
8
main.py
8
main.py
@@ -33,10 +33,16 @@ app.mount("/static", StaticFiles(directory="static"), name="static")
|
||||
|
||||
@app.get("/")
|
||||
async def index():
|
||||
"""主页"""
|
||||
"""主页(原版)"""
|
||||
return FileResponse("static/index.html")
|
||||
|
||||
|
||||
@app.get("/tts")
|
||||
async def tts_page():
|
||||
"""TTS版本页面"""
|
||||
return FileResponse("static/tts.html")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PORT = int(os.getenv("PORT", "19019"))
|
||||
SSL_KEY = os.getenv("SSL_KEY", "key.pem")
|
||||
|
||||
Reference in New Issue
Block a user