5trix commited on
Commit
0aad7d0
·
verified ·
1 Parent(s): c9382d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -42,4 +42,13 @@ def generate(req: TTSRequest, x_api_key: str = Header(None)):
42
  language=req.language,
43
  file_path=output
44
  )
45
- return FileResponse(output, media_type="audio/wav", filename="output.wav")
 
 
 
 
 
 
 
 
 
 
42
  language=req.language,
43
  file_path=output
44
  )
45
+ return FileResponse(output, media_type="audio/wav", filename="output.wav")
46
+
47
+ @app.post("/debug-auth")
48
+ def debug_auth(x_api_key: str = Header(None)):
49
+ return {
50
+ "received": x_api_key,
51
+ "expected_preview": API_KEY[:4] + "...",
52
+ "length_received": len(x_api_key) if x_api_key else 0,
53
+ "matches": x_api_key == API_KEY
54
+ }