gohanjanyan commited on
Commit
78dc95d
·
verified ·
1 Parent(s): fa2520b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -348,7 +348,8 @@ def post_infer(body: InferReq):
348
  print(f"[Infer] {fn}", flush=True)
349
  t0 = time.time()
350
  wv, duration, chunks, boundaries, segments, aba_pattern = infer_wav(fp)
351
- transcript = ASR_TRANSCRIPTS.get(fn, "")
 
352
  if not transcript:
353
  print(f"[ASR] Running on {fn} ...", flush=True)
354
  transcript = run_asr(wv)
@@ -361,7 +362,7 @@ def post_infer(body: InferReq):
361
  "boundaries": boundaries,
362
  "segments": segments,
363
  "aba_pattern": aba_pattern,
364
- "gt": GROUND_TRUTH.get(fn, []),
365
  "transcript": transcript,
366
  "elapsed": elapsed,
367
  }
 
348
  print(f"[Infer] {fn}", flush=True)
349
  t0 = time.time()
350
  wv, duration, chunks, boundaries, segments, aba_pattern = infer_wav(fp)
351
+ key = os.path.basename(fn)
352
+ transcript = ASR_TRANSCRIPTS.get(key, "")
353
  if not transcript:
354
  print(f"[ASR] Running on {fn} ...", flush=True)
355
  transcript = run_asr(wv)
 
362
  "boundaries": boundaries,
363
  "segments": segments,
364
  "aba_pattern": aba_pattern,
365
+ "gt": GROUND_TRUTH.get(key, []),
366
  "transcript": transcript,
367
  "elapsed": elapsed,
368
  }