HyperMind-Labs commited on
Commit
4840e76
·
1 Parent(s): 599961b
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -53,8 +53,7 @@ with st.expander('About this App'):
53
  wav_audio_data = st_audiorec()
54
  if wav_audio_data is not None:
55
  output_filename = "audio_data.wav"
56
- audio_data_bytes = wav_audio_data.decode('latin-1')
57
- np_wav = np.frombuffer(audio_data_bytes, dtype=np.int16)
58
  wavfile.write(output_filename, RATE, np_wav)
59
  loaded_data = torchaudio.load("audio_data.wav")
60
  st.write(loaded_data.shape)
 
53
  wav_audio_data = st_audiorec()
54
  if wav_audio_data is not None:
55
  output_filename = "audio_data.wav"
56
+ np_wav = np.frombuffer(wav_audio_data, dtype=np.int16)
 
57
  wavfile.write(output_filename, RATE, np_wav)
58
  loaded_data = torchaudio.load("audio_data.wav")
59
  st.write(loaded_data.shape)