mrfakename commited on
Commit
29a5f2c
1 Parent(s): 4039e20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -6
app.py CHANGED
@@ -34,7 +34,19 @@ Please fill out [this form](https://huggingface.co/spaces/{os.getenv('HF_ID')}/d
34
  ABOUT = f"""
35
  ## About
36
 
37
- TTS Arena is a project created to evaluate leading speech synthesis models. It is inspired by the [Chatbot Arena](https://chat.lmsys.org/) by LMSYS.
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  {request}
40
  """.strip()
@@ -81,14 +93,38 @@ model_names = {
81
  'fastpitch': 'FastPitch',
82
  'jenny': 'Jenny',
83
  'tortoise': 'Tortoise TTS',
84
- 'xtts2': 'XTTSv2',
85
- 'xtts': 'XTTS',
 
86
  'elevenlabs': 'ElevenLabs',
87
  'openai': 'OpenAI',
88
  'hierspeech': 'HierSpeech++',
89
  'pheme': 'PolyAI Pheme',
90
  'speecht5': 'SpeechT5',
91
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  # def get_random_split(existing_split=None):
93
  # choice = random.choice(list(dataset.keys()))
94
  # if existing_split and choice == existing_split:
@@ -114,6 +150,7 @@ def get_data():
114
  cursor.execute('SELECT name, upvote, downvote FROM model WHERE (upvote + downvote) > 5')
115
  data = cursor.fetchall()
116
  df = pd.DataFrame(data, columns=['name', 'upvote', 'downvote'])
 
117
  df['name'] = df['name'].replace(model_names)
118
  df['votes'] = df['upvote'] + df['downvote']
119
  # df['score'] = round((df['upvote'] / df['votes']) * 100, 2) # Percentage score
@@ -131,10 +168,10 @@ def get_data():
131
  df.at[j, 'score'] += 32 * (actual_b - expected_b)
132
  df['score'] = round(df['score'])
133
  ## ELO SCORE
134
-
135
  df = df.sort_values(by='score', ascending=False)
 
136
  # df = df[['name', 'score', 'upvote', 'votes']]
137
- df = df[['name', 'score', 'votes']]
138
  return df
139
 
140
  # def get_random_splits():
@@ -200,10 +237,11 @@ def reload(chosenmodel1=None, chosenmodel2=None):
200
  with gr.Blocks() as leaderboard:
201
  gr.Markdown(LDESC)
202
  # df = gr.Dataframe(interactive=False, value=get_data())
203
- df = gr.Dataframe(interactive=False, min_width=0, wrap=True, column_widths=[200, 50, 50])
204
  reloadbtn = gr.Button("Refresh")
205
  leaderboard.load(get_data, outputs=[df])
206
  reloadbtn.click(get_data, outputs=[df])
 
207
 
208
  with gr.Blocks() as vote:
209
  gr.Markdown(INSTR)
 
34
  ABOUT = f"""
35
  ## About
36
 
37
+ The TTS Arena is a project created to evaluate leading speech synthesis models. It is inspired by the [Chatbot Arena](https://chat.lmsys.org/) by LMSYS.
38
+
39
+ ### How it Works
40
+
41
+ First, vote on two samples of text-to-speech models. The models that synthesized the samples are not revealed to mitigate bias.
42
+
43
+ As you vote, the leaderboard will be updated based on votes. We calculate a score for each model using a method similar to the [Elo system](https://en.wikipedia.org/wiki/Elo_rating_system).
44
+
45
+ ### Motivation
46
+
47
+ Recently, many new open-access speech synthesis models have been made available to the community. However, there is no standardized evaluation or benchmark to measure the quality and naturalness of these models.
48
+
49
+ The TTS Arena is an attempt to benchmark these models and find the highest-quality models available to the community.
50
 
51
  {request}
52
  """.strip()
 
93
  'fastpitch': 'FastPitch',
94
  'jenny': 'Jenny',
95
  'tortoise': 'Tortoise TTS',
96
+ 'xtts2': 'Coqui XTTSv2',
97
+ 'xtts': 'Coqui XTTS',
98
+ 'openvoice': 'MyShell OpenVoice',
99
  'elevenlabs': 'ElevenLabs',
100
  'openai': 'OpenAI',
101
  'hierspeech': 'HierSpeech++',
102
  'pheme': 'PolyAI Pheme',
103
  'speecht5': 'SpeechT5',
104
  }
105
+ model_licenses = {
106
+ 'styletts2': 'MIT',
107
+ 'tacotron': 'BSD-3',
108
+ 'tacotronph': 'BSD-3',
109
+ 'tacotrondca': 'BSD-3',
110
+ 'speedyspeech': 'BSD-3',
111
+ 'overflow': 'MIT',
112
+ 'vits': 'MIT',
113
+ 'openvoice': 'MIT',
114
+ 'vitsneon': 'BSD-3',
115
+ 'neuralhmm': 'MIT',
116
+ 'glow': 'MIT',
117
+ 'fastpitch': 'Apache 2.0',
118
+ 'jenny': 'Jenny License',
119
+ 'tortoise': 'Apache 2.0',
120
+ 'xtts2': 'CPML (NC)',
121
+ 'xtts': 'CPML (NC)',
122
+ 'elevenlabs': 'Proprietary',
123
+ 'openai': 'Proprietary',
124
+ 'hierspeech': 'MIT',
125
+ 'pheme': 'CC-BY',
126
+ 'speecht5': 'MIT',
127
+ }
128
  # def get_random_split(existing_split=None):
129
  # choice = random.choice(list(dataset.keys()))
130
  # if existing_split and choice == existing_split:
 
150
  cursor.execute('SELECT name, upvote, downvote FROM model WHERE (upvote + downvote) > 5')
151
  data = cursor.fetchall()
152
  df = pd.DataFrame(data, columns=['name', 'upvote', 'downvote'])
153
+ df['license'] = df['name'].replace(model_licenses)
154
  df['name'] = df['name'].replace(model_names)
155
  df['votes'] = df['upvote'] + df['downvote']
156
  # df['score'] = round((df['upvote'] / df['votes']) * 100, 2) # Percentage score
 
168
  df.at[j, 'score'] += 32 * (actual_b - expected_b)
169
  df['score'] = round(df['score'])
170
  ## ELO SCORE
 
171
  df = df.sort_values(by='score', ascending=False)
172
+ df['order'] = ['#' + str(i + 1) for i in range(len(df))]
173
  # df = df[['name', 'score', 'upvote', 'votes']]
174
+ df = df[['order', 'name', 'score', 'license', 'votes']]
175
  return df
176
 
177
  # def get_random_splits():
 
237
  with gr.Blocks() as leaderboard:
238
  gr.Markdown(LDESC)
239
  # df = gr.Dataframe(interactive=False, value=get_data())
240
+ df = gr.Dataframe(interactive=False, min_width=0, wrap=True, column_widths=[30, 200, 50, 75, 50])
241
  reloadbtn = gr.Button("Refresh")
242
  leaderboard.load(get_data, outputs=[df])
243
  reloadbtn.click(get_data, outputs=[df])
244
+ gr.Markdown("DISCLAIMER: The licenses listed may not be accurate or up to date, you are responsible for checking the licenses before using the models. Also note that some models may have additional usage restrictions.")
245
 
246
  with gr.Blocks() as vote:
247
  gr.Markdown(INSTR)