PlotweaverModel commited on
Commit
b800108
·
verified ·
1 Parent(s): 0a5456e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -148,9 +148,9 @@ YOURVOIC_VOICES = [
148
  ]
149
 
150
  YOURVOIC_MODELS = [
151
- "aura-max -- Premium quality (best for audiobooks)",
152
- "aura-prime -- Balanced quality and speed",
153
  "aura-lite -- Fast, good for previews",
 
154
  "rapid-max -- Fast with good quality",
155
  "rapid-flash -- Fastest, real-time apps",
156
  ]
@@ -343,7 +343,7 @@ def translate_text(client, text, target_language, lang_config):
343
  def generate_speech_preset(client, text, voice, language, lang_config, translate, chunk_index, output_dir):
344
  output_wav = os.path.join(output_dir, f"chunk_{chunk_index:04d}.wav")
345
  if translate and language != "English":
346
- sys_prompt = (f"Translate English to {language} ({lang_config['native']}) "
347
  f"and narrate expressively. Respond ONLY with spoken {language} narration.")
348
  user_text = f"Translate into {language} and narrate:\n\n{text}"
349
  else:
@@ -625,7 +625,7 @@ def generate_audiobook(text_input, file_input, target_language, voice_mode,
625
  stats = (
626
  f"**Audiobook Generated!**\n\n"
627
  f"- **Source:** {total_chars:,} characters in {total_chunks} chunks\n"
628
- f"- **Language:** {target_language} ({lang_config['native']})\n"
629
  f"- **Voice:** {voice_info}\n"
630
  f"- **Engine:** {mode_info}\n"
631
  f"- **File size:** {audio_size:.1f} MB\n"
@@ -773,7 +773,7 @@ with gr.Blocks(title="Audiobook Generator") as demo:
773
  yv_voice = gr.Dropdown(choices=YOURVOIC_VOICES, value="Peter -- English, Professional male",
774
  label="YourVoic Voice", visible=False, allow_custom_value=True,
775
  info="Type any voice name or pick from the list")
776
- yv_model = gr.Dropdown(choices=YOURVOIC_MODELS, value="aura-max -- Premium quality (best for audiobooks)",
777
  label="YourVoic Model", visible=False)
778
  yv_emotion = gr.Dropdown(choices=YOURVOIC_EMOTIONS, value="friendly",
779
  label="Emotion Style", visible=False,
 
148
  ]
149
 
150
  YOURVOIC_MODELS = [
151
+ "aura-prime -- Balanced quality and speed (recommended)",
 
152
  "aura-lite -- Fast, good for previews",
153
+ "aura-max -- Premium quality (paid plans only)",
154
  "rapid-max -- Fast with good quality",
155
  "rapid-flash -- Fastest, real-time apps",
156
  ]
 
343
  def generate_speech_preset(client, text, voice, language, lang_config, translate, chunk_index, output_dir):
344
  output_wav = os.path.join(output_dir, f"chunk_{chunk_index:04d}.wav")
345
  if translate and language != "English":
346
+ sys_prompt = (f"Translate English to {language} "
347
  f"and narrate expressively. Respond ONLY with spoken {language} narration.")
348
  user_text = f"Translate into {language} and narrate:\n\n{text}"
349
  else:
 
625
  stats = (
626
  f"**Audiobook Generated!**\n\n"
627
  f"- **Source:** {total_chars:,} characters in {total_chunks} chunks\n"
628
+ f"- **Language:** {target_language}\n"
629
  f"- **Voice:** {voice_info}\n"
630
  f"- **Engine:** {mode_info}\n"
631
  f"- **File size:** {audio_size:.1f} MB\n"
 
773
  yv_voice = gr.Dropdown(choices=YOURVOIC_VOICES, value="Peter -- English, Professional male",
774
  label="YourVoic Voice", visible=False, allow_custom_value=True,
775
  info="Type any voice name or pick from the list")
776
+ yv_model = gr.Dropdown(choices=YOURVOIC_MODELS, value="aura-prime -- Balanced quality and speed (recommended)",
777
  label="YourVoic Model", visible=False)
778
  yv_emotion = gr.Dropdown(choices=YOURVOIC_EMOTIONS, value="friendly",
779
  label="Emotion Style", visible=False,