akpande2 commited on
Commit
d24f8d3
·
verified ·
1 Parent(s): 748d3a1

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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(temp_file, output_dir=AUDIO_OUTPUT_DIR)
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: