cdleong commited on
Commit
87d6449
·
1 Parent(s): 676b3fa

Trying again to fix Unknown Format

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -39,6 +39,7 @@ def get_path_to_wav_format(uploaded_file):
39
  st.info(f"waveform, sample_rate: {waveform}, {sample_rate}")
40
  torchaudio.save(new_desired_path, waveform, sample_rate,
41
  encoding="PCM_S", # Prevent encoding errors. https://stackoverflow.com/questions/60352850/wave-error-unknown-format-3-arises-when-trying-to-convert-a-wav-file-into-text
 
42
  )
43
 
44
  return new_desired_path
 
39
  st.info(f"waveform, sample_rate: {waveform}, {sample_rate}")
40
  torchaudio.save(new_desired_path, waveform, sample_rate,
41
  encoding="PCM_S", # Prevent encoding errors. https://stackoverflow.com/questions/60352850/wave-error-unknown-format-3-arises-when-trying-to-convert-a-wav-file-into-text
42
+ bits_per_sample=16,
43
  )
44
 
45
  return new_desired_path