sleeper371 commited on
Commit
6bf7ff9
·
1 Parent(s): 8cd6164
Files changed (2) hide show
  1. app.py +1 -1
  2. event_handlers.py +1 -1
app.py CHANGED
@@ -79,7 +79,7 @@ with gr.Blocks(
79
  gr.Markdown("### Text Input")
80
  text_input_block = gr.Textbox(
81
  lines=30,
82
- placeholder="""Long text will be split to sentences using only a dot `.` as a separator. Make sure one sentence can be spoken in less than 13 seconds or the speech will be trim on the end. If input text with more than one sentence, make sure to choose a prompt to have consistent voice across sentences. All split sentences are running in one batch with a batch size equal to the number of sentences in the text, assuming zero GPU can take a very large batch size.""",
83
  label="Text Prompts",
84
  )
85
  generate_btn = gr.Button("Generate", variant="primary")
 
79
  gr.Markdown("### Text Input")
80
  text_input_block = gr.Textbox(
81
  lines=30,
82
+ placeholder="""Long text will be split to sentences using only a dot `.` as a separator.\nMake sure one sentence can be spoken in less than 13 seconds or the speech will be trim on the end.\nIf input text with more than one sentence, make sure to choose a prompt to have consistent voice across sentences.\nAll split sentences are running in one batch with a batch size equal to the number of sentences in the text, assuming zero GPU can take a very large batch size.\nGenerated audio are not guaranteed to follow your text closely, this is a text to audio model not a text to speech model""",
83
  label="Text Prompts",
84
  )
85
  generate_btn = gr.Button("Generate", variant="primary")
event_handlers.py CHANGED
@@ -348,7 +348,7 @@ def generate_batch_audio(
348
 
349
  generated_metadata = []
350
 
351
- bark_prompt = os.path.join(PROMPT_DIR, "en_speaker_6.npz")
352
  if selected_prompt_name != "None":
353
  # gr.Info("Loading audio prompt...")
354
  prompt_path = os.path.join(PROMPT_DIR, selected_prompt_name)
 
348
 
349
  generated_metadata = []
350
 
351
+ bark_prompt = BarkPrompt.load_prompt(os.path.join(PROMPT_DIR, "en_speaker_6.npz"), torch.device("cpu"))
352
  if selected_prompt_name != "None":
353
  # gr.Info("Loading audio prompt...")
354
  prompt_path = os.path.join(PROMPT_DIR, selected_prompt_name)