cdleong commited on
Commit
df07559
·
1 Parent(s): 663ac44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -15,12 +15,12 @@ def get_path_to_wav_format(uploaded_file):
15
 
16
  if ".wav" in uploaded_file.name:
17
  return Path(uploaded_file.name)
18
- if ".mp3" in uploaded_file.name:
19
- new_desired_path = actual_file_path.with_suffix(".wav")
20
- waveform, sample_rate = torchaudio.load(actual_file_path)
21
- st.info(waveform, sample_rate)
22
- torchaudio.save(new_desired_path, waveform, sample_rate)
23
- return new_desired_path
24
 
25
 
26
  def get_langcode_for_allosaurus(input_code):
 
15
 
16
  if ".wav" in uploaded_file.name:
17
  return Path(uploaded_file.name)
18
+ if ".mp3" in uploaded_file.name:
19
+ new_desired_path = actual_file_path.with_suffix(".wav")
20
+ waveform, sample_rate = torchaudio.load(actual_file_path)
21
+ st.info(waveform, sample_rate)
22
+ torchaudio.save(new_desired_path, waveform, sample_rate)
23
+ return new_desired_path
24
 
25
 
26
  def get_langcode_for_allosaurus(input_code):