Add-Vishnu commited on
Commit
4b3d742
·
1 Parent(s): b33162e

Update asr.py

Browse files
Files changed (1) hide show
  1. asr.py +1 -0
asr.py CHANGED
@@ -14,6 +14,7 @@ processor_lid = AutoFeatureExtractor.from_pretrained(model_id_lid)
14
  model_lid = Wav2Vec2ForSequenceClassification.from_pretrained(model_id_lid)
15
 
16
  def transcribe(audio):
 
17
  audio = librosa.load(audio, sr=16_000, mono=True)[0]
18
  inputs = processor(audio, sampling_rate=16_000,return_tensors="pt")
19
  with torch.no_grad():
 
14
  model_lid = Wav2Vec2ForSequenceClassification.from_pretrained(model_id_lid)
15
 
16
  def transcribe(audio):
17
+ print(audio)
18
  audio = librosa.load(audio, sr=16_000, mono=True)[0]
19
  inputs = processor(audio, sampling_rate=16_000,return_tensors="pt")
20
  with torch.no_grad():