vineelpratap commited on
Commit
20d488d
1 Parent(s): a4979bb

Update asr.py

Browse files
Files changed (1) hide show
  1. asr.py +2 -1
asr.py CHANGED
@@ -2,6 +2,7 @@ import librosa
2
  from transformers import Wav2Vec2ForCTC, AutoProcessor
3
  import torch
4
  import numpy as np
 
5
 
6
  from huggingface_hub import hf_hub_download
7
  from torchaudio.models.decoder import ctc_decoder
@@ -124,7 +125,7 @@ def transcribe(audio_data=None, lang="eng (English)"):
124
 
125
 
126
  ASR_EXAMPLES = [
127
- ["assets/english.mp3", "eng (English)"],
128
  # ["assets/tamil.mp3", "tam (Tamil)"],
129
  # ["assets/burmese.mp3", "mya (Burmese)"],
130
  ]
 
2
  from transformers import Wav2Vec2ForCTC, AutoProcessor
3
  import torch
4
  import numpy as np
5
+ from pathlib import Path
6
 
7
  from huggingface_hub import hf_hub_download
8
  from torchaudio.models.decoder import ctc_decoder
 
125
 
126
 
127
  ASR_EXAMPLES = [
128
+ [Path("assets/english.mp3"), "eng (English)"],
129
  # ["assets/tamil.mp3", "tam (Tamil)"],
130
  # ["assets/burmese.mp3", "mya (Burmese)"],
131
  ]