Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,11 +19,11 @@ feature_extractor = AutoFeatureExtractor.from_pretrained(repo_id)
|
|
19 |
SAMPLE_RATE = feature_extractor.sampling_rate
|
20 |
SEED = 42
|
21 |
|
22 |
-
default_text = "*Remember* - this is only the first iteration of the model! To improve the prosody and naturalness of the speech further,
|
23 |
default_description = "Thomas speaks with emphasis and excitement at a moderate pace with high quality."
|
24 |
examples = [
|
25 |
[
|
26 |
-
"Remember - this is only the first iteration of the model
|
27 |
"Thomas speaks in a sad tone at a moderate pace with high quality."
|
28 |
],
|
29 |
[
|
@@ -124,7 +124,7 @@ with gr.Blocks(css=css) as block:
|
|
124 |
"
|
125 |
>
|
126 |
<h1 style="font-weight: 900; margin-bottom: 7px; line-height: normal;">
|
127 |
-
SML Emotional
|
128 |
</h1>
|
129 |
</div>
|
130 |
</div>
|
@@ -132,6 +132,10 @@ with gr.Blocks(css=css) as block:
|
|
132 |
)
|
133 |
gr.HTML(
|
134 |
f"""
|
|
|
|
|
|
|
|
|
135 |
<p>Tips for ensuring good generation:
|
136 |
<ul>
|
137 |
<li>Specify the name of a male speaker (Jerry, Thomas) or female speaker (Talia, Elisabeth) for consistent voices</li>
|
@@ -154,6 +158,11 @@ with gr.Blocks(css=css) as block:
|
|
154 |
outputs = [audio_out]
|
155 |
gr.Examples(examples=examples, fn=gen_tts, inputs=inputs, outputs=outputs, cache_examples=True)
|
156 |
run_button.click(fn=gen_tts, inputs=inputs, outputs=outputs, queue=True)
|
|
|
|
|
|
|
|
|
|
|
157 |
|
158 |
block.queue()
|
159 |
block.launch(share=True)
|
|
|
19 |
SAMPLE_RATE = feature_extractor.sampling_rate
|
20 |
SEED = 42
|
21 |
|
22 |
+
default_text = "*Remember* - this is only the first iteration of the model! To improve the prosody and naturalness of the speech further, I am scaling up the amount of *training data*."
|
23 |
default_description = "Thomas speaks with emphasis and excitement at a moderate pace with high quality."
|
24 |
examples = [
|
25 |
[
|
26 |
+
"*Remember* - this is only the first iteration of the model! To improve the prosody and naturalness of the speech further, I am scaling up the amount of *training data*.",
|
27 |
"Thomas speaks in a sad tone at a moderate pace with high quality."
|
28 |
],
|
29 |
[
|
|
|
124 |
"
|
125 |
>
|
126 |
<h1 style="font-weight: 900; margin-bottom: 7px; line-height: normal;">
|
127 |
+
SML Emotional TTS- Hiring Project Assignment
|
128 |
</h1>
|
129 |
</div>
|
130 |
</div>
|
|
|
132 |
)
|
133 |
gr.HTML(
|
134 |
f"""
|
135 |
+
<p><a href="https://huggingface.co/parler-tts/parler-tts-mini-expresso"> Parler-TTS Mini: Expresso</a>
|
136 |
+
is a text-to-speech (TTS) model fine-tuned on the <a href="https://huggingface.co/datasets/ylacombe/expresso"> Expresso dataset</a>.
|
137 |
+
It generates high-quality speech in a given <b>emotion</b> and <b>voice</b> that can be controlled through a simple text prompt.</p>
|
138 |
+
|
139 |
<p>Tips for ensuring good generation:
|
140 |
<ul>
|
141 |
<li>Specify the name of a male speaker (Jerry, Thomas) or female speaker (Talia, Elisabeth) for consistent voices</li>
|
|
|
158 |
outputs = [audio_out]
|
159 |
gr.Examples(examples=examples, fn=gen_tts, inputs=inputs, outputs=outputs, cache_examples=True)
|
160 |
run_button.click(fn=gen_tts, inputs=inputs, outputs=outputs, queue=True)
|
161 |
+
gr.HTML(
|
162 |
+
"""
|
163 |
+
<p></p>
|
164 |
+
"""
|
165 |
+
)
|
166 |
|
167 |
block.queue()
|
168 |
block.launch(share=True)
|