husseinelsaadi commited on
Commit
b79bc93
·
verified ·
1 Parent(s): 744457a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1751,7 +1751,7 @@ gc.collect()
1751
  model_bark = None
1752
  processor_bark = None
1753
  whisper_model = None
1754
- bark_voice_preset = "v2/en_speaker_6"
1755
 
1756
  # Thread pool for async operations
1757
  executor = ThreadPoolExecutor(max_workers=2)
@@ -1962,7 +1962,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
1962
 
1963
  # Generate audio with Bark (wait for it)
1964
  start = time.perf_counter()
1965
- audio_future = bark_tts_async(first_q)
 
1966
  audio_path = audio_future.result()
1967
  print("⏱️ Bark TTS took", round(time.perf_counter() - start, 2), "seconds")
1968
 
 
1751
  model_bark = None
1752
  processor_bark = None
1753
  whisper_model = None
1754
+ bark_voice_preset = "v2/en_speaker_1"
1755
 
1756
  # Thread pool for async operations
1757
  executor = ThreadPoolExecutor(max_workers=2)
 
1962
 
1963
  # Generate audio with Bark (wait for it)
1964
  start = time.perf_counter()
1965
+ cleaned_text = first_q.strip().replace("\n", " ")
1966
+ audio_future = bark_tts_async(cleaned_text)
1967
  audio_path = audio_future.result()
1968
  print("⏱️ Bark TTS took", round(time.perf_counter() - start, 2), "seconds")
1969