Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -130,7 +130,7 @@ async def health_check():
|
|
| 130 |
|
| 131 |
|
| 132 |
@app.post("/coach")
|
| 133 |
-
async def analyze_speech(file: UploadFile = File(...)):
|
| 134 |
"""
|
| 135 |
Main endpoint: Upload audio file and receive comprehensive analysis
|
| 136 |
|
|
@@ -197,7 +197,7 @@ async def analyze_speech(file: UploadFile = File(...)):
|
|
| 197 |
print(f"\n📁 Processing: {file.filename} ({len(content) / 1024:.1f} KB)")
|
| 198 |
|
| 199 |
# Run analysis
|
| 200 |
-
result = coach_engine.analyze_speech(
|
| 201 |
|
| 202 |
# Check for analysis errors
|
| 203 |
if "error" in result:
|
|
|
|
| 130 |
|
| 131 |
|
| 132 |
@app.post("/coach")
|
| 133 |
+
async def analyze_speech(file: UploadFile = File(...), avatar_gender: str = Form('male')):
|
| 134 |
"""
|
| 135 |
Main endpoint: Upload audio file and receive comprehensive analysis
|
| 136 |
|
|
|
|
| 197 |
print(f"\n📁 Processing: {file.filename} ({len(content) / 1024:.1f} KB)")
|
| 198 |
|
| 199 |
# Run analysis
|
| 200 |
+
result = coach_engine.analyze_speech(audio_path, enable_tts=True, avatar_gender=avatar_gender)
|
| 201 |
|
| 202 |
# Check for analysis errors
|
| 203 |
if "error" in result:
|