unijoh commited on
Commit
54c9615
1 Parent(s): 7bbbabd

Update asr.py

Browse files
Files changed (1) hide show
  1. asr.py +2 -1
asr.py CHANGED
@@ -22,7 +22,8 @@ def transcribe(audio):
22
  if audio is None:
23
  return "ERROR: You have to either use the microphone or upload an audio file"
24
 
25
- audio_samples = librosa.load(audio, sr=ASR_SAMPLING_RATE, mono=True)[0]
 
26
  inputs = processor(audio_samples, sampling_rate=ASR_SAMPLING_RATE, return_tensors="pt")
27
 
28
  # Set language ID for Faroese
 
22
  if audio is None:
23
  return "ERROR: You have to either use the microphone or upload an audio file"
24
 
25
+ logging.info(f"Loading audio file: {audio}")
26
+ audio_samples, _ = librosa.load(audio, sr=ASR_SAMPLING_RATE, mono=True)
27
  inputs = processor(audio_samples, sampling_rate=ASR_SAMPLING_RATE, return_tensors="pt")
28
 
29
  # Set language ID for Faroese