cocktailpeanut commited on
Commit
58ff1ba
·
1 Parent(s): de3a90d
Files changed (1) hide show
  1. app_local.py +5 -4
app_local.py CHANGED
@@ -86,10 +86,11 @@ def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence):
86
  gr.Info("Converting audio...")
87
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
88
  aseg = AudioSegment.from_file(ref_audio_orig)
 
89
  audio_duration = len(aseg)
90
- if audio_duration > 15000:
91
- gr.Warning("Audio is over 15s, clipping to only first 15s.")
92
- aseg = aseg[:15000]
93
  aseg.export(f.name, format="wav")
94
  ref_audio = f.name
95
  if exp_name == "F5-TTS":
@@ -208,4 +209,4 @@ If you're having issues, try converting your reference audio to WAV or MP3, clip
208
  gr.Markdown("Unofficial demo by [mrfakename](https://x.com/realmrfakename)")
209
 
210
 
211
- app.queue().launch()
 
86
  gr.Info("Converting audio...")
87
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
88
  aseg = AudioSegment.from_file(ref_audio_orig)
89
+ aseg = aseg.set_channels(1)
90
  audio_duration = len(aseg)
91
+ # if audio_duration > 15000:
92
+ # gr.Warning("Audio is over 15s, clipping to only first 15s.")
93
+ # aseg = aseg[:15000]
94
  aseg.export(f.name, format="wav")
95
  ref_audio = f.name
96
  if exp_name == "F5-TTS":
 
209
  gr.Markdown("Unofficial demo by [mrfakename](https://x.com/realmrfakename)")
210
 
211
 
212
+ app.queue().launch()