Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
@@ -109,11 +109,10 @@ VOCAB = get_vocab()
|
|
109 |
def tokenize(ps):
|
110 |
return [i for i in map(VOCAB.get, ps) if i is not None]
|
111 |
|
112 |
-
# ๐งช Experimental voices may be unstable.
|
113 |
-
# โ๏ธ Arena voices are averages of other voices.
|
114 |
CHOICES = {
|
115 |
-
'๐บ๐ธ ๐บ American Female
|
116 |
-
'๐บ๐ธ ๐บ American Female
|
117 |
'๐บ๐ธ ๐บ Alloy ๐งช': 'af_alloy',
|
118 |
'๐บ๐ธ ๐บ Bella': 'af_bella',
|
119 |
'๐บ๐ธ ๐บ Jessica ๐งช': 'af_jessica',
|
@@ -223,7 +222,7 @@ with gr.Blocks() as basic_tts:
|
|
223 |
with gr.Row():
|
224 |
with gr.Column():
|
225 |
text = gr.Textbox(label='Input Text')
|
226 |
-
voice = gr.Dropdown(list(CHOICES.items()), label='Voice', info='
|
227 |
with gr.Row():
|
228 |
random_btn = gr.Button('Random Text', variant='secondary')
|
229 |
generate_btn = gr.Button('Generate', variant='primary')
|
@@ -406,7 +405,7 @@ with gr.Blocks() as lf_tts:
|
|
406 |
file_input = gr.File(file_types=['.pdf', '.txt'], label='Input File: pdf or txt')
|
407 |
text = gr.Textbox(label='Input Text')
|
408 |
file_input.upload(fn=extract_text, inputs=[file_input], outputs=[text])
|
409 |
-
voice = gr.Dropdown(list(CHOICES.items()), label='Voice', info='
|
410 |
with gr.Accordion('Text Settings', open=False):
|
411 |
skip_square_brackets = gr.Checkbox(True, label='Skip [Square Brackets]', info='Recommended for academic papers, Wikipedia articles, or texts with citations.')
|
412 |
newline_split = gr.Number(2, label='Newline Split', info='Split the input text on this many newlines. Affects how the text is segmented.', precision=0, minimum=0)
|
|
|
109 |
def tokenize(ps):
|
110 |
return [i for i in map(VOCAB.get, ps) if i is not None]
|
111 |
|
112 |
+
# โญ Starred voices are averages of similar voices. ๐งช Experimental voices may be unstable.
|
|
|
113 |
CHOICES = {
|
114 |
+
'๐บ๐ธ ๐บ American Female โญ': 'af',
|
115 |
+
'๐บ๐ธ ๐บ American Female 1': 'af_1',
|
116 |
'๐บ๐ธ ๐บ Alloy ๐งช': 'af_alloy',
|
117 |
'๐บ๐ธ ๐บ Bella': 'af_bella',
|
118 |
'๐บ๐ธ ๐บ Jessica ๐งช': 'af_jessica',
|
|
|
222 |
with gr.Row():
|
223 |
with gr.Column():
|
224 |
text = gr.Textbox(label='Input Text')
|
225 |
+
voice = gr.Dropdown(list(CHOICES.items()), label='Voice', info='โญ Starred voices are averages of similar voices. ๐งช Experimental voices may be unstable.')
|
226 |
with gr.Row():
|
227 |
random_btn = gr.Button('Random Text', variant='secondary')
|
228 |
generate_btn = gr.Button('Generate', variant='primary')
|
|
|
405 |
file_input = gr.File(file_types=['.pdf', '.txt'], label='Input File: pdf or txt')
|
406 |
text = gr.Textbox(label='Input Text')
|
407 |
file_input.upload(fn=extract_text, inputs=[file_input], outputs=[text])
|
408 |
+
voice = gr.Dropdown(list(CHOICES.items()), label='Voice', info='โญ Starred voices are averages of similar voices. ๐งช Experimental voices may be unstable.')
|
409 |
with gr.Accordion('Text Settings', open=False):
|
410 |
skip_square_brackets = gr.Checkbox(True, label='Skip [Square Brackets]', info='Recommended for academic papers, Wikipedia articles, or texts with citations.')
|
411 |
newline_split = gr.Number(2, label='Newline Split', info='Split the input text on this many newlines. Affects how the text is segmented.', precision=0, minimum=0)
|