greg0rs commited on
Commit
0e8ac26
·
verified ·
1 Parent(s): 48e0ec5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -1315,7 +1315,7 @@ async def transcribe(audio: UploadFile = File(...), similarity_threshold: float
1315
  word_timings.append((word_info["start"], word_info["end"]))
1316
 
1317
  if not words:
1318
- return {"transcript": "", "resolved": "", "resolved_colored": "", "audio_data": []}
1319
 
1320
  log(f"Found {len(words)} words with precise WhisperX timings")
1321
 
@@ -1572,7 +1572,6 @@ async def transcribe(audio: UploadFile = File(...), similarity_threshold: float
1572
  })
1573
 
1574
  # 7. Format output
1575
- full_transcript = " ".join(word_texts)
1576
  resolved_output = []
1577
  resolved_colored = []
1578
 
@@ -1593,7 +1592,6 @@ async def transcribe(audio: UploadFile = File(...), similarity_threshold: float
1593
  log("=== WHISPERX ENGLISH-ONLY PHONEME ANALYSIS COMPLETE ===")
1594
 
1595
  return {
1596
- "transcript": full_transcript,
1597
  "resolved": " ".join(resolved_output),
1598
  "resolved_colored": " ".join(resolved_colored),
1599
  "audio_data": audio_data_list,
@@ -1619,7 +1617,6 @@ async def transcribe(audio: UploadFile = File(...), similarity_threshold: float
1619
  import traceback
1620
  log(f"Traceback: {traceback.format_exc()}")
1621
  return {
1622
- "transcript": "Error occurred",
1623
  "resolved": "Error occurred",
1624
  "resolved_colored": "Error occurred",
1625
  "audio_data": [],
 
1315
  word_timings.append((word_info["start"], word_info["end"]))
1316
 
1317
  if not words:
1318
+ return {"resolved": "", "resolved_colored": "", "audio_data": []}
1319
 
1320
  log(f"Found {len(words)} words with precise WhisperX timings")
1321
 
 
1572
  })
1573
 
1574
  # 7. Format output
 
1575
  resolved_output = []
1576
  resolved_colored = []
1577
 
 
1592
  log("=== WHISPERX ENGLISH-ONLY PHONEME ANALYSIS COMPLETE ===")
1593
 
1594
  return {
 
1595
  "resolved": " ".join(resolved_output),
1596
  "resolved_colored": " ".join(resolved_colored),
1597
  "audio_data": audio_data_list,
 
1617
  import traceback
1618
  log(f"Traceback: {traceback.format_exc()}")
1619
  return {
 
1620
  "resolved": "Error occurred",
1621
  "resolved_colored": "Error occurred",
1622
  "audio_data": [],