backtracking commited on
Commit
753aa08
·
verified ·
1 Parent(s): c0c84cf

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -15,8 +15,8 @@ def synthesize_audio(text, speaker):
15
  return f"Error: {e}"
16
 
17
  # Define available speakers
18
- # TinyTTS supports 'LJ' and potentially others based on the checkpoint
19
- available_speakers = list(tts.model.SPK2ID.keys()) if hasattr(tts.model, "SPK2ID") else ["LJ", "female", "male"]
20
 
21
  # Create Gradio interface
22
  with gr.Blocks(title="TinyTTS Demo", theme=gr.themes.Soft()) as app:
@@ -46,7 +46,6 @@ with gr.Blocks(title="TinyTTS Demo", theme=gr.themes.Soft()) as app:
46
  gr.Examples(
47
  examples=[
48
  ["The weather is nice today, and I feel very relaxed.", "female"],
49
- ["Hello there! I am an ultra-lightweight text to speech system.", "LJ"],
50
  ["TinyTTS has only nine million parameters, making it extremely fast on CPUs.", "female"],
51
  ],
52
  inputs=[text_input, speaker_dropdown],
 
15
  return f"Error: {e}"
16
 
17
  # Define available speakers
18
+ # Define available speakers
19
+ available_speakers = list(tts.model.SPK2ID.keys()) if hasattr(tts.model, "SPK2ID") else ["female"]
20
 
21
  # Create Gradio interface
22
  with gr.Blocks(title="TinyTTS Demo", theme=gr.themes.Soft()) as app:
 
46
  gr.Examples(
47
  examples=[
48
  ["The weather is nice today, and I feel very relaxed.", "female"],
 
49
  ["TinyTTS has only nine million parameters, making it extremely fast on CPUs.", "female"],
50
  ],
51
  inputs=[text_input, speaker_dropdown],