Flux9665 commited on
Commit
ed293bb
1 Parent(s): c2160ee

add more prompts

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -50,8 +50,15 @@ class TTS_Interface:
50
  def read(self, prompt, speaker_1, speaker_2, speaker_3):
51
  if prompt == "Hello, here is the first sentence. And here comes the second one. I think three sentences is enough to get the point across, right?":
52
  reference_audio = "reference_audios/clone_me_1.wav"
53
- else:
54
  reference_audio = "reference_audios/clone_me_2.wav"
 
 
 
 
 
 
 
55
  text_list = prompt.replace(".", ".|").replace("?", "?|").replace("!", "!|").split("|")
56
  # we don't split on the punctuation marks because we want to retain them.
57
 
@@ -146,7 +153,10 @@ article = "<p style='text-align: left'>This is still a work in progress, models
146
  iface = gr.Interface(fn=meta_model.read,
147
  inputs=[gr.inputs.Dropdown(
148
  ["Hello, here is the first sentence. And here comes the second one. I think three sentences is enough to get the point across, right?",
149
- "I am excited! And my prosody is rather flat. And this sentence is shocking!"],
 
 
 
150
  type="value",
151
  default="Hello, here is the first sentence. And here comes the second one. I think three sentences is enough to get the point across, right?",
152
  label="Select which utterance should be customized"),
 
50
  def read(self, prompt, speaker_1, speaker_2, speaker_3):
51
  if prompt == "Hello, here is the first sentence. And here comes the second one. I think three sentences is enough to get the point across, right?":
52
  reference_audio = "reference_audios/clone_me_1.wav"
53
+ elif prompt == "I am excited! And my prosody is rather flat. And this sentence is shocking!":
54
  reference_audio = "reference_audios/clone_me_2.wav"
55
+ elif prompt == "Don't do it! But I want to! Then go ahead.":
56
+ reference_audio = "reference_audios/clone_me_3.wav"
57
+ elif prompt == "How many examples do I realistically need? How about five? That should do it!":
58
+ reference_audio = "reference_audios/clone_me_4.wav"
59
+ elif prompt == "Betty Botter bought some butter, but she said the butters bitter. If I put it in my batter, it will make my batter bitter. But a bit of better butter will make my batter better.":
60
+ reference_audio = "reference_audios/clone_me_5.wav"
61
+
62
  text_list = prompt.replace(".", ".|").replace("?", "?|").replace("!", "!|").split("|")
63
  # we don't split on the punctuation marks because we want to retain them.
64
 
 
153
  iface = gr.Interface(fn=meta_model.read,
154
  inputs=[gr.inputs.Dropdown(
155
  ["Hello, here is the first sentence. And here comes the second one. I think three sentences is enough to get the point across, right?",
156
+ "I am excited! And my prosody is rather flat. And this sentence is shocking!",
157
+ "Don't do it! But I want to! Then go ahead.",
158
+ "How many examples do I realistically need? How about five? That should do it!",
159
+ "Betty Botter bought some butter, but she said the butters bitter. If I put it in my batter, it will make my batter bitter. But a bit of better butter will make my batter better."],
160
  type="value",
161
  default="Hello, here is the first sentence. And here comes the second one. I think three sentences is enough to get the point across, right?",
162
  label="Select which utterance should be customized"),