ssolito commited on
Commit
989e450
1 Parent(s): fd449bb

Update whisper.py

Browse files
Files changed (1) hide show
  1. whisper.py +1 -1
whisper.py CHANGED
@@ -15,7 +15,7 @@ processor = WhisperProcessor.from_pretrained(MODEL_NAME)
15
 
16
 
17
  def generate(audio_path):
18
- input_audio, sample_rate = torchaudio.load(audio)
19
  input_audio = torchaudio.transforms.Resample(sample_rate, 16000)(input_audio)
20
 
21
  input_speech = input_audio[0]
 
15
 
16
 
17
  def generate(audio_path):
18
+ input_audio, sample_rate = torchaudio.load(audio_path)
19
  input_audio = torchaudio.transforms.Resample(sample_rate, 16000)(input_audio)
20
 
21
  input_speech = input_audio[0]