Spaces:
Sleeping
Sleeping
fix params
Browse files
app.py
CHANGED
|
@@ -287,7 +287,7 @@ async def chat(text: str = Form(...), speak: bool = False, raw: bool = False):
|
|
| 287 |
}
|
| 288 |
|
| 289 |
@app.post("/speak")
|
| 290 |
-
async def speak_to_ai(audio_file: UploadFile = File(...), speak: bool = True):
|
| 291 |
if not audio_file.content_type.startswith('audio/'):
|
| 292 |
raise HTTPException(status_code=400, detail="File must be an audio file")
|
| 293 |
audio_data = await audio_file.read()
|
|
|
|
| 287 |
}
|
| 288 |
|
| 289 |
@app.post("/speak")
|
| 290 |
+
async def speak_to_ai(audio_file: UploadFile = File(...), speak: bool = Form(True)):
|
| 291 |
if not audio_file.content_type.startswith('audio/'):
|
| 292 |
raise HTTPException(status_code=400, detail="File must be an audio file")
|
| 293 |
audio_data = await audio_file.read()
|