ing0 commited on
Commit
5cb345f
·
1 Parent(s): ff46889
Files changed (2) hide show
  1. app.py +1 -1
  2. diffrhythm/infer/infer_utils.py +1 -1
app.py CHANGED
@@ -280,7 +280,7 @@ with gr.Blocks(css=css) as demo:
280
  )
281
 
282
  odeint_method = gr.Radio(["euler", "midpoint", "rk4","implicit_adams"], label="ODE Solver", value="euler")
283
- file_type = gr.Dropdown(["wav", "mp3", "ogg"], label="Output Format", value="wav")
284
 
285
 
286
  gr.Examples(
 
280
  )
281
 
282
  odeint_method = gr.Radio(["euler", "midpoint", "rk4","implicit_adams"], label="ODE Solver", value="euler")
283
+ file_type = gr.Dropdown(["wav", "mp3", "ogg"], label="Output Format", value="mp3")
284
 
285
 
286
  gr.Examples(
diffrhythm/infer/infer_utils.py CHANGED
@@ -65,7 +65,7 @@ def prepare_audio(audio, in_sr, target_sr, target_length, target_channels, devic
65
  audio = audio.to(device)
66
 
67
  if in_sr != target_sr:
68
- resample_tf = T.Resample(in_sr, target_sr).to(device)
69
  audio = resample_tf(audio)
70
  if target_length is None:
71
  target_length = audio.shape[-1]
 
65
  audio = audio.to(device)
66
 
67
  if in_sr != target_sr:
68
+ resample_tf = torchaudio.transforms.Resample(in_sr, target_sr).to(device)
69
  audio = resample_tf(audio)
70
  if target_length is None:
71
  target_length = audio.shape[-1]