MahmoodAnaam commited on
Commit
059eaab
·
verified ·
1 Parent(s): ada17fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,7 +6,7 @@ DEFAULT_MODEL_ID = "FusionRAG/msp-audio-wav2vec2-lrs2"
6
  DEVICE = 0 if torch.cuda.is_available() else -1
7
 
8
 
9
- asr_pipe = pipeline(
10
  task="automatic-speech-recognition",
11
  model=DEFAULT_MODEL_ID,
12
  device=DEVICE,
@@ -17,8 +17,8 @@ asr_pipe = pipeline(
17
  def transcribe(audio):
18
  if audio is None:
19
  return ""
20
- result = asr_pipe(audio)
21
- return result
22
 
23
 
24
  demo = gr.Interface(
 
6
  DEVICE = 0 if torch.cuda.is_available() else -1
7
 
8
 
9
+ pipe = pipeline(
10
  task="automatic-speech-recognition",
11
  model=DEFAULT_MODEL_ID,
12
  device=DEVICE,
 
17
  def transcribe(audio):
18
  if audio is None:
19
  return ""
20
+ result = pipe(audio)
21
+ return result["text"]
22
 
23
 
24
  demo = gr.Interface(