Gregniuki commited on
Commit
4acc4e6
·
1 Parent(s): ef26742

Update routes/tts.py

Browse files
Files changed (1) hide show
  1. routes/tts.py +0 -14
routes/tts.py CHANGED
@@ -1,14 +0,0 @@
1
- # app/routes/tts.py
2
-
3
- from fastapi import APIRouter, Depends
4
- from app.auth import UserInResponse # Import a model for the user response
5
- from app.tts import tts_synthesis # Import your TTS synthesis function
6
- from app.main import get_current_user
7
-
8
- router = APIRouter()
9
-
10
- @router.get("/synthesize", response_model=UserInResponse)
11
- def synthesize_text(text: str, current_user: str = Depends(get_current_user)):
12
- # Use the get_current_user dependency to ensure authentication
13
- audio_data = tts_synthesis(text, current_user)
14
- return {"user": current_user, "audio_data": audio_data}