hexgrad commited on
Commit
480e1dc
โ€ข
1 Parent(s): 480b27e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
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 โš”๏ธ': 'af',
116
- '๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿšบ American Female 0': 'af_0',
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='๐Ÿงช Experimental voices may be unstable. โš”๏ธ Arena voices are averages of other voices.')
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='๐Ÿงช Experimental voices may be unstable. โš”๏ธ Arena voices are averages of other voices.')
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)