File size: 18,513 Bytes
0ba527d
66182b2
 
d40e945
 
66182b2
d40e945
66182b2
d40e945
66182b2
 
 
d40e945
66182b2
 
 
d40e945
66182b2
 
 
 
 
 
 
3d78d05
66182b2
 
 
 
 
 
3d78d05
 
66182b2
 
 
3d78d05
66182b2
 
 
 
 
3d78d05
66182b2
 
 
 
48cef3d
66182b2
 
 
0ba527d
 
 
 
 
 
48cef3d
 
 
 
 
 
 
 
 
f029537
 
66182b2
 
3d78d05
66182b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d6e6719
66182b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d6e6719
66182b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d6e6719
66182b2
 
 
 
 
5113380
66182b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d6e6719
66182b2
 
 
 
 
 
 
 
0ba527d
66182b2
d6e6719
66182b2
 
 
 
 
 
 
fbd1b09
66182b2
 
 
 
 
dc0c295
 
5113380
66182b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d6e6719
66182b2
 
 
 
 
 
48cef3d
66182b2
 
 
d6e6719
66182b2
0ba527d
 
 
48cef3d
0ba527d
 
 
 
48cef3d
0ba527d
 
 
 
 
 
 
 
 
 
d6e6719
0ba527d
 
 
 
 
 
 
 
d6e6719
0ba527d
48cef3d
f029537
48cef3d
 
 
 
 
 
 
f029537
48cef3d
 
 
 
 
 
f029537
 
 
 
 
 
 
 
66182b2
 
 
48cef3d
66182b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48cef3d
 
 
66182b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fbd1b09
66182b2
 
 
 
 
 
 
fbd1b09
 
66182b2
 
48cef3d
66182b2
48cef3d
 
 
 
 
 
66182b2
 
 
 
 
 
 
 
 
 
 
 
 
 
48cef3d
 
 
66182b2
0ba527d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48cef3d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f029537
 
 
 
 
 
d40e945
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1973202
 
 
 
 
 
 
 
 
d434929
 
1973202
 
d6e6719
1973202
 
 
 
 
 
 
 
0ba527d
1973202
 
 
 
 
 
 
d6e6719
 
 
 
 
 
1973202
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
import os
from gradio_client import handle_file

# Models to include in the leaderboard, only include models that users can vote on
AVAILABLE_MODELS = {
    # 'XTTSv2': 'xtts',
    # 'WhisperSpeech': 'whisperspeech',
    # 'ElevenLabs': 'eleven',
    # 'OpenVoice': 'openvoice',
    # 'OpenVoice V2': 'openvoicev2',
    # 'Play.HT 2.0': 'playht',
    # 'Play.HT 3.0 Mini': 'playht3',
    # 'MetaVoice': 'metavoice',
    # 'MeloTTS': 'melo',
    # 'StyleTTS 2': 'styletts2',
    # 'GPT-SoVITS': 'sovits',
    # 'Vokan TTS': 'vokan',
    # 'VoiceCraft 2.0': 'voicecraft',
    # 'Parler TTS': 'parler',
    # 'Parler TTS Large': 'parlerlarge',
    # 'Fish Speech v1.4': 'fish',

    # HF Gradio Spaces: # <works with gradio version #>
    # gravio version that works with most spaces: 4.29
     'coqui/xtts': 'coqui/xtts', # 4.29 4.32
    # 'collabora/WhisperSpeech': 'collabora/WhisperSpeech', # 4.32 4.36.1
    # 'myshell-ai/OpenVoice': 'myshell-ai/OpenVoice', # same devs as MeloTTS, which scores higher # 4.29
    # 'myshell-ai/OpenVoiceV2': 'myshell-ai/OpenVoiceV2', # same devs as MeloTTS, which scores higher # 4.29
    # 'mrfakename/MetaVoice-1B-v0.1': 'mrfakename/MetaVoice-1B-v0.1', # 4.29 4.32
    'Pendrokar/xVASynth-TTS': 'Pendrokar/xVASynth-TTS', # 4.29 4.32 4.42.0
    # 'coqui/CoquiTTS': 'coqui/CoquiTTS',
     'mrfakename/MeloTTS': 'mrfakename/MeloTTS', # 4.29 4.32
     'fishaudio/fish-speech-1': 'fishaudio/fish-speech-1', # 4.29 4.32 4.36.1

    # E2 & F5 TTS
    # F5 model
    'mrfakename/E2-F5-TTS': 'mrfakename/E2-F5-TTS', # 5.0

    # # Parler
    # Parler Large model
    # 'parler-tts/parler_tts': 'parler-tts/parler_tts', # 4.29 4.32 4.36.1 4.42.0
    # Parler Mini model
    'parler-tts/parler_tts': 'parler-tts/parler_tts', # 4.29 4.32 4.36.1 4.42.0
    # 'parler-tts/parler_tts_mini': 'parler-tts/parler_tts_mini', # Mini is the default model of parler_tts
    # 'parler-tts/parler-tts-expresso': 'parler-tts/parler-tts-expresso', # 4.29 4.32 4.36.1 4.42.0

    # # Microsoft Edge TTS
    # 'innoai/Edge-TTS-Text-to-Speech': 'innoai/Edge-TTS-Text-to-Speech', # API disabled

    # IMS-Toucan
    # 'Flux9665/MassivelyMultilingualTTS': 'Flux9665/MassivelyMultilingualTTS', # 5.1
    # StyleTTS v2
    # 'Pendrokar/style-tts-2': 'Pendrokar/style-tts-2', #  more votes in OG arena; emotionless
    # StyleTTS kokoro
    'hexgrad/kokoro': 'hexgrad/kokoro',

    # MaskGCT (by Amphion)
    # 'amphion/maskgct': 'amphion/maskgct', # DEMANDS 300 seconds of ZeroGPU!
    # 'Svngoku/maskgct-audio-lab': 'Svngoku/maskgct-audio-lab', # DEMANDS 300 seconds of ZeroGPU!

    # GPT-SoVITS
    'lj1995/GPT-SoVITS-v2': 'lj1995/GPT-SoVITS-v2',

    # OuteTTS
    # 'OuteAI/OuteTTS-0.2-500M-Demo': 'OuteAI/OuteTTS-0.2-500M-Demo',
    'ameerazam08/OuteTTS-0.2-500M-Demo': 'ameerazam08/OuteTTS-0.2-500M-Demo', # ZeroGPU Space
    # OuteTTS 1B
    'OuteAI/OuteTTS-0.3-1B-Demo': 'OuteAI/OuteTTS-0.3-1B-Demo',

    # HF TTS w issues
    # 'LeeSangHoon/HierSpeech_TTS': 'LeeSangHoon/HierSpeech_TTS', # irresponsive to exclamation marks # 4.29
    # 'PolyAI/pheme': '/predict#0', # sleepy HF Space
    # 'amphion/Text-to-Speech': '/predict#0', # disabled also on original HF space due to poor ratings
    # 'suno/bark': '3#0', # Hallucinates
    # 'shivammehta25/Matcha-TTS': '5#0', # seems to require multiple requests for setup
    # 'styletts2/styletts2': '0#0', # API disabled, awaiting approval of PR #15
    # 'Manmay/tortoise-tts': '/predict#0', # Cannot retrieve streamed file; 403
    # 'pytorch/Tacotron2': '0#0', # old gradio
}

HF_SPACES = {
    # XTTS v2
    'coqui/xtts': {
        'name': 'XTTS v2',
        'function': '1',
        'text_param_index': 0,
        'return_audio_index': 1,
        'series': 'XTTS',
    },
    # WhisperSpeech
    'collabora/WhisperSpeech': {
        'name': 'WhisperSpeech',
        'function': '/whisper_speech_demo',
        'text_param_index': 0,
        'return_audio_index': 0,
        'series': 'WhisperSpeech',
        'emoji': '😷', # broken space
    },
    # OpenVoice (MyShell.ai)
    'myshell-ai/OpenVoice': {
        'name':'OpenVoice',
        'function': '1',
        'text_param_index': 0,
        'return_audio_index': 1,
        'series': 'OpenVoice',
    },
    # OpenVoice v2 (MyShell.ai)
    'myshell-ai/OpenVoiceV2': {
        'name':'OpenVoice v2',
        'function': '1',
        'text_param_index': 0,
        'return_audio_index': 1,
        'series': 'OpenVoice',
    },
    # MetaVoice
    'mrfakename/MetaVoice-1B-v0.1': {
        'name':'MetaVoice-1B',
        'function': '/tts',
        'text_param_index': 0,
        'return_audio_index': 0,
        'series': 'MetaVoice-1B',
        'emoji': '😷', # broken space
    },
    # xVASynth (CPU)
    'Pendrokar/xVASynth-TTS': {
        'name': 'xVASynth v3',
        'function': '/predict',
        'text_param_index': 0,
        'return_audio_index': 0,
        'series': 'xVASynth',
    },
    # CoquiTTS (CPU)
    'coqui/CoquiTTS': {
        'name': 'CoquiTTS',
        'function': '0',
        'text_param_index': 0,
        'return_audio_index': 0,
        'series': 'CoquiTTS',
    },
    # HierSpeech_TTS
    'LeeSangHoon/HierSpeech_TTS': {
        'name': 'HierSpeech++',
        'function': '/predict',
        'text_param_index': 0,
        'return_audio_index': 0,
        'series': 'HierSpeech++',
        'emoji': 'πŸ˜’', # unemotional
    },
    # MeloTTS (MyShell.ai)
    'mrfakename/MeloTTS': {
        'name': 'MeloTTS',
        'function': '/synthesize',
        'text_param_index': 'text',
        'return_audio_index': 0,
        'series': 'MeloTTS',
    },

    # Parler
    'parler-tts/parler_tts': {
        'name': 'Parler Mini',
        'function': '/gen_tts',
        'text_param_index': 0,
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'Parler',
    },
    # Parler Mini
    # 'parler-tts/parler_tts': {
    #     'name': 'Parler Large',
    #     'function': '/gen_tts',
    #     'text_param_index': 0,
    #     'return_audio_index': 0,
    #     'is_zero_gpu_space': True,
    #    'series': 'Parler',
    # },
    # Parler Mini which using Expresso dataset
    'parler-tts/parler-tts-expresso': {
        'name': 'Parler Mini Expresso',
        'function': '/gen_tts',
        'text_param_index': 0,
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'Parler',
        'emoji': 'πŸ˜ƒ', # overlly jolly voice
    },

    # Microsoft Edge TTS
    'innoai/Edge-TTS-Text-to-Speech': {
        'name': 'Edge TTS',
        'function': '/predict',
        'text_param_index': 0,
        'return_audio_index': 0,
        'is_closed_source': True,
        'series': 'Edge TTS',
        'emoji': 'πŸ˜‘', # api disabled
    },

    # Fish Speech
    'fishaudio/fish-speech-1': {
        'name': 'Fish Speech',
        'function': '/inference_wrapper',
        'text_param_index': 0,
        'return_audio_index': 0,
        'series': 'Fish Speech',
    },

    # E2/F5 TTS
    'mrfakename/E2-F5-TTS': {
        'name': 'F5 TTS',
        'function': '/basic_tts',
        'text_param_index': 'gen_text_input',
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'E2/F5 TTS',
    },

    # IMS-Toucan
    'Flux9665/MassivelyMultilingualTTS': {
        'name': 'IMS-Toucan',
		'function': "/predict",
        'text_param_index': 0,
        'return_audio_index': 0,
        'series': 'IMS-Toucan',
    },

    # IMS-Toucan English non-artificial
    'Flux9665/EnglishToucan': {
        'name': 'IMS-Toucan EN',
		'function': "/predict",
        'text_param_index': 0,
        'return_audio_index': 0,
        'series': 'IMS-Toucan',
        'emoji': 'πŸ˜’', # unemotional
    },

    # StyleTTS v2
    'Pendrokar/style-tts-2': {
        'name': 'StyleTTS v2',
        'function': '/synthesize',
        'text_param_index': 'text',
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'StyleTTS',
        'emoji': 'πŸ˜ͺ',
    },

    # StyleTTS v2 kokoro fine tune
    'hexgrad/kokoro': {
        'name': 'StyleTTS Kokoro v19',
        'function': '/generate',
        'text_param_index': 0,
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'Kokoro',
    },

    # MaskGCT (by Amphion)
    'amphion/maskgct': {
        'name': 'MaskGCT',
        'function': '/predict',
        'text_param_index': 1,
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'MaskGCT',
        'emoji': 'πŸ₯΅', # 300s minimum ZeroGPU!
    },
    'Svngoku/maskgct-audio-lab': {
        'name': 'MaskGCT',
        'function': '/predict',
        'text_param_index': 1,
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'MaskGCT',
        'emoji': 'πŸ₯΅', # 300s minimum ZeroGPU!
    },
    'lj1995/GPT-SoVITS-v2': {
        'name': 'GPT-SoVITS v2',
        'function': '/get_tts_wav',
        'text_param_index': 'text',
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'GPT-SoVITS',
    },
    'ameerazam08/OuteTTS-0.2-500M-Demo': {
        'name': 'OuteTTS v2 500M',
        'function': '/generate_tts',
        'text_param_index': 0,
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'OuteTTS',
    },
    'OuteAI/OuteTTS-0.3-1B-Demo': {
        'name': 'OuteTTS v3 1B',
        'function': '/generate_tts',
        'text_param_index': 'text',
        'return_audio_index': 0,
        'is_zero_gpu_space': True,
        'series': 'OuteTTS',
    },
}

# for zero-shot TTS - voice sample used by XTTS (11 seconds)
DEFAULT_VOICE_SAMPLE_STR = 'voice_samples/xtts_sample.wav'
DEFAULT_VOICE_SAMPLE = handle_file(DEFAULT_VOICE_SAMPLE_STR)
DEFAULT_VOICE_TRANSCRIPT = "The Hispaniola was rolling scuppers under in the ocean swell. The booms were tearing at the blocks, the rudder was banging to and fro, and the whole ship creaking, groaning, and jumping like a manufactory."

OVERRIDE_INPUTS = {
    'coqui/xtts': {
        1: 'en',
        2: DEFAULT_VOICE_SAMPLE_STR, # voice sample
        3: None, # mic voice sample
        4: False, #use_mic
        5: False, #cleanup_reference
        6: False, #auto_detect
    },
    'collabora/WhisperSpeech': {
        1: DEFAULT_VOICE_SAMPLE, # voice sample
        2: DEFAULT_VOICE_SAMPLE, # voice sample URL
        3: 14.0, #Tempo - Gradio Slider issue: takes min. rather than value
    },
    'myshell-ai/OpenVoice': {
        1: 'default', # style
        2: 'https://huggingface.co/spaces/myshell-ai/OpenVoiceV2/resolve/main/examples/speaker0.mp3', # voice sample
    },
    'myshell-ai/OpenVoiceV2': {
        1: 'en_us', # style
        2: 'https://huggingface.co/spaces/myshell-ai/OpenVoiceV2/resolve/main/examples/speaker0.mp3', # voice sample
    },
    'PolyAI/pheme': {
        1: 'YOU1000000044_S0000798', # voice
        2: 210,
        3: 0.7, #Tempo - Gradio Slider issue: takes min. rather than value
    },
    'Pendrokar/xVASynth-TTS': {
        1: 'x_ex04', #fine-tuned voice model name
        3: 1.0, #pacing/duration - Gradio Slider issue: takes min. rather than value
    },
    'suno/bark': {
        1: 'Speaker 3 (en)', # voice
    },
    'amphion/Text-to-Speech': {
        1: 'LikeManyWaters', # voice
    },
    'LeeSangHoon/HierSpeech_TTS': {
        1: handle_file('https://huggingface.co/spaces/LeeSangHoon/HierSpeech_TTS/resolve/main/example/female.wav'), # voice sample
        2: 0.333,
        3: 0.333,
        4: 1,
        5: 1,
        6: 0,
        7: 1111,
    },
    'Manmay/tortoise-tts': {
        1: None, # text-from-file
        2: 'angie', # voice
        3: 'disabled', # second voice for a dialogue
        4: 'No', # split by newline
    },
    'mrfakename/MeloTTS': {
        'speaker': 'EN-Default',	# DEFAULT_VOICE_SAMPLE=EN-Default
        'speed': 1.0,
        'language': 'EN',
    },
    'mrfakename/MetaVoice-1B-v0.1': {
		1: 5,	# float (numeric value between 0.0 and 10.0) in 'Speech Stability - improves text following for a challenging speaker' Slider component
		2: 5,	# float (numeric value between 1.0 and 5.0) in 'Speaker similarity - How closely to match speaker identity and speech style.' Slider component
		3: "Preset voices",	# Literal['Preset voices', 'Upload target voice']  in 'Choose voice' Radio component
		4: "Bria",	# Literal['Bria', 'Alex', 'Jacob']  in 'Preset voices' Dropdown component
		5: None,	# filepath  in 'Upload a clean sample to clone. Sample should contain 1 speaker, be between 30-90 seconds and not contain background noise.' Audio component
    },
    'parler-tts/parler_tts': {
        1: 'Laura; Laura\'s female voice; very clear audio', # description/prompt
    },
    'parler-tts/parler-tts-expresso': {
        1: 'Elisabeth; Elisabeth\'s female voice; very clear audio', # description/prompt
    },
    'innoai/Edge-TTS-Text-to-Speech': {
        1: 'en-US-EmmaMultilingualNeural - en-US (Female)', # voice
        2: 0, # pace rate
        3: 0, # pitch
    },

    'fishaudio/fish-speech-1': {
        1: False, # normalize
		2: handle_file('https://huggingface.co/spaces/fishaudio/fish-speech-1/resolve/main/examples/English.wav'), # reference_audio
		3: 'In the ancient land of Eldoria, where the skies were painted with shades of mystic hues and the forests whispered secrets of old, there existed a dragon named Zephyros. Unlike the fearsome tales of dragons that plagued human hearts with terror, Zephyros was a creature of wonder and wisdom, revered by all who knew of his existence.', # reference_text
		4: 0, # max_new_tokens
		5: 200, # chunk_length
		6: 0.7, # top_p
		7: 1.2, # repetition_penalty
		8: 0.7, # temperature
		9: 0, #seed
		10: "never", #use_memory_cache
    },

    # F5
    'mrfakename/E2-F5-TTS': {
        'ref_audio_input': handle_file('voice_samples/EN_B00004_S00051_W000213.mp3'),
        'ref_text_input': 'Our model manager is Graham, whom we observed leading a small team of chemical engineers within a multinational European firm we\'ll call Kruger Bern.',
        'remove_silence': False,
        'cross_fade_duration_slider': 0.15,
        'nfe_slider': 32,
        'speed_slider': 1,
    },

    # IMS-Toucan
    'Flux9665/MassivelyMultilingualTTS': {
		1: "English (eng)", #language
		2: 0.6, #prosody_creativity
		3: 1, #duration_scaling_factor
		4: 41, #voice_seed
		5: -7.5, #emb1
		6: None, #reference_audio
    },

    # StyleTTS 2
    'Pendrokar/style-tts-2': {
        'voice': "f-us-2",
        'lang': 'en-us',
        'lngsteps': 8,
    },

    # StyleTTS 2 kokoro
    'hexgrad/kokoro': {
		1: "af", #voice
		2: None, #ps
		3: 1, #speed
		4: 3000, #trim
		5: False, #use_gpu; fast enough with multithreaded with CPU
        6: os.getenv('KOKORO'), #sk
    },

    # maskGCT (by amphion)
    'amphion/maskgct': {
        0: DEFAULT_VOICE_SAMPLE, #prompt_wav
		2: -1, #target_len
		3: 25, #n_timesteps
    },
    'Svngoku/maskgct-audio-lab': {
        0: DEFAULT_VOICE_SAMPLE, #prompt_wav
		2: -1, #target_len
		3: 25, #n_timesteps
    },
    'lj1995/GPT-SoVITS-v2': {
        'ref_wav_path': handle_file('voice_samples/EN_B00004_S00051_W000213.wav'),
        'prompt_text': "Our model manager is Graham, whom we observed leading a small team of chemical engineers within a multinational European firm we'll call",
        'prompt_language': "English",
        # text: "Please surprise me and speak in whatever voice you enjoy.",
        'text_language': "English",
        'how_to_cut': "No slice",
        'top_k': 15,
        'top_p': 1,
        'temperature': 1,
        'ref_free': False,
        'speed': 1,
        'if_freeze': False,
        'inp_refs': None,
    },
    'ameerazam08/OuteTTS-0.2-500M-Demo': {
        1: 0.1, # temperature
        2: 1.1, # repetition_penalty
        3: "en", # language
        4: "female_1", # speaker_selection
        5: None, # reference_audio
        6: None, # reference_text
    },
    'OuteAI/OuteTTS-0.3-1B-Demo': {
		'temperature': 0.1,
		'repetition_penalty': 1.1,
		'speaker_selection': "en_female_1",
		'reference_audio': None,
    },
}


# Model name mapping, can include models that users cannot vote on
model_names = {
    'styletts2': 'StyleTTS 2',
    'tacotron': 'Tacotron',
    'tacotronph': 'Tacotron Phoneme',
    'tacotrondca': 'Tacotron DCA',
    'speedyspeech': 'Speedy Speech',
    'overflow': 'Overflow TTS',
    'vits': 'VITS',
    'vitsneon': 'VITS Neon',
    'neuralhmm': 'Neural HMM',
    'glow': 'Glow TTS',
    'fastpitch': 'FastPitch',
    'jenny': 'Jenny',
    'tortoise': 'Tortoise TTS',
    'xtts2': 'Coqui XTTSv2',
    'xtts': 'Coqui XTTS',
    'openvoice': 'MyShell OpenVoice',
    'elevenlabs': 'ElevenLabs',
    'openai': 'OpenAI',
    'hierspeech': 'HierSpeech++',
    'pheme': 'PolyAI Pheme',
    'speecht5': 'SpeechT5',
    'metavoice': 'MetaVoice-1B',
}

def make_link_to_space(model_name, for_leaderboard=False):
    # create a anchor link if a HF space
    style = 'text-decoration: underline;text-decoration-style: dotted;'
    title = ''

    if model_name in AVAILABLE_MODELS:
        style += 'color: var(--link-text-color);'
        if '/' in model_name:
            title += model_name
    else:
        style += 'font-style: italic;'
        title += model_name +'; Disabled (See AVAILABLE_MODELS within code for why)'

    model_basename = model_name
    if model_name in HF_SPACES:
        model_basename = HF_SPACES[model_name]['name']

    try:
        if(
            for_leaderboard
            and HF_SPACES[model_name]['is_closed_source']
        ):
            model_basename += ' πŸ”'
            title += '; πŸ” = online only or proprietary'
    except:
        pass

    if '/' in model_name:
        emoji = 'πŸ€—' # HF
        try:
            emoji = HF_SPACES[model_name]['emoji']
        except:
            pass
        return emoji +' <a target="_blank" style="'+ style +'" title="'+ title +'" href="'+ 'https://huggingface.co/spaces/'+ model_name +'">'+ model_basename +'</a>'

    # otherwise just return the model name
    return '<span style="'+ style +'" title="'+ title +'" href="'+ 'https://huggingface.co/spaces/'+ model_name +'">'+ model_name +'</span>'

def markdown_link_to_space(model_name):
    # create a anchor link if a HF space using markdown syntax
    if '/' in model_name:
        return 'πŸ€— [' + model_name + '](https://huggingface.co/spaces/' + model_name + ')'
    # otherwise just return the model name
    return model_name