whooray commited on
Commit
939194c
1 Parent(s): c360b15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ import librosa
7
 
8
  def resample_audio(audio, target_sample_rate):
9
  current_sample_rate, audio_data = audio
10
- print(audio_data.shape, type(audio_data))
11
  if current_sample_rate != target_sample_rate:
12
  resampled_audio_data = librosa.resample(audio_data, orig_sr=current_sample_rate, target_sr=target_sample_rate)
13
  return target_sample_rate, resampled_audio_data
 
7
 
8
  def resample_audio(audio, target_sample_rate):
9
  current_sample_rate, audio_data = audio
10
+ audio_data = audio_data.astype(np.float32)
11
  if current_sample_rate != target_sample_rate:
12
  resampled_audio_data = librosa.resample(audio_data, orig_sr=current_sample_rate, target_sr=target_sample_rate)
13
  return target_sample_rate, resampled_audio_data