Bishan commited on
Commit
10e3c4c
1 Parent(s): 26c4803

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ import sox
6
  import subprocess
7
 
8
 
9
- def read_file_and_process(wav_file):
10
  filename = wav_file.split('.')[0]
11
  filename_16k = filename + "16k.wav"
12
  resampler(wav_file, filename_16k)
@@ -92,7 +92,7 @@ def parse(wav_file, language):
92
  model = Wav2Vec2ForCTC.from_pretrained("Harveenchadha/vakyansh-wav2vec2-indian-english-enm-700")
93
 
94
 
95
- input_values = read_file_and_process(wav_file)
96
  with torch.no_grad():
97
  logits = model(**input_values).logits
98
 
 
6
  import subprocess
7
 
8
 
9
+ def read_file_and_process(wav_file, processor):
10
  filename = wav_file.split('.')[0]
11
  filename_16k = filename + "16k.wav"
12
  resampler(wav_file, filename_16k)
 
92
  model = Wav2Vec2ForCTC.from_pretrained("Harveenchadha/vakyansh-wav2vec2-indian-english-enm-700")
93
 
94
 
95
+ input_values = read_file_and_process(wav_file, processor)
96
  with torch.no_grad():
97
  logits = model(**input_values).logits
98