Harveenchadha commited on
Commit
f2d1246
1 Parent(s): e273092

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -21,7 +21,14 @@ def read_file(wav):
21
  return resampled_signal
22
 
23
 
 
 
24
 
 
 
 
 
 
25
 
26
  def parse_transcription_with_lm(wav_file):
27
  input_values = read_file_and_process(wav_file)
 
21
  return resampled_signal
22
 
23
 
24
+ def resampler(input_file_path, output_folder_path):
25
+ #output_file_path = output_folder_path + input_file_path.split('/')[-1]
26
 
27
+ command = (
28
+ f"ffmpeg -hide_banner -loglevel panic -i {input_file_path} -ar 16000 -ac 1 -bits_per_raw_sample 16 -vn "
29
+ f"{output_file_path}"
30
+ )
31
+ subprocess.call(command, shell=True)
32
 
33
  def parse_transcription_with_lm(wav_file):
34
  input_values = read_file_and_process(wav_file)