Kit-Lemonfoot commited on
Commit
859ee64
1 Parent(s): 4913c7c

Added Runie, updated images, updated Space to latest Gradio.

Browse files
.gitattributes CHANGED
@@ -383,3 +383,4 @@ weights/hololive-jp/Hajime/model.index filter=lfs diff=lfs merge=lfs -text
383
  weights/holostars/Fuma/added_IVF360_Flat_nprobe_1_YatogamiFuma_Speaking_KitLemonfoot_v2.index filter=lfs diff=lfs merge=lfs -text
384
  weights/holostars/Rikka/added_IVF2819_Flat_nprobe_1_Rikkaroid_Hybrid_KitLemonfoot_v2_mbkm.index filter=lfs diff=lfs merge=lfs -text
385
  weights/other/Sakana/added_IVF853_Flat_nprobe_1_h2osakana_v2_mbkm.index filter=lfs diff=lfs merge=lfs -text
 
 
383
  weights/holostars/Fuma/added_IVF360_Flat_nprobe_1_YatogamiFuma_Speaking_KitLemonfoot_v2.index filter=lfs diff=lfs merge=lfs -text
384
  weights/holostars/Rikka/added_IVF2819_Flat_nprobe_1_Rikkaroid_Hybrid_KitLemonfoot_v2_mbkm.index filter=lfs diff=lfs merge=lfs -text
385
  weights/other/Sakana/added_IVF853_Flat_nprobe_1_h2osakana_v2_mbkm.index filter=lfs diff=lfs merge=lfs -text
386
+ weights/phaseconnect/Runie/added_IVF1386_Flat_nprobe_1_runie_v2_mbkm.index filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: ▶️🎤
4
  colorFrom: pink
5
  colorTo: red
6
  sdk: gradio
7
- sdk_version: 3.35.2
8
  app_file: app.py
9
  pinned: false
10
  license: creativeml-openrail-m
 
4
  colorFrom: pink
5
  colorTo: red
6
  sdk: gradio
7
+ sdk_version: 4.36.0
8
  app_file: app.py
9
  pinned: false
10
  license: creativeml-openrail-m
app.py CHANGED
@@ -1,604 +1,443 @@
1
- print("Starting up. Please be patient...")
2
-
3
- import os
4
- import glob
5
- import json
6
- import traceback
7
- import logging
8
- import gradio as gr
9
- import numpy as np
10
- import librosa
11
- import torch
12
- import asyncio
13
- import edge_tts
14
- import yt_dlp
15
- import ffmpeg
16
- import subprocess
17
- import sys
18
- import io
19
- import wave
20
- from datetime import datetime
21
- from fairseq import checkpoint_utils
22
- from lib.infer_pack.models import (
23
- SynthesizerTrnMs256NSFsid,
24
- SynthesizerTrnMs256NSFsid_nono,
25
- SynthesizerTrnMs768NSFsid,
26
- SynthesizerTrnMs768NSFsid_nono,
27
- )
28
- from vc_infer_pipeline import VC
29
- from config import Config
30
- from edgetts_db import tts_order_voice
31
-
32
- config = Config()
33
- logging.getLogger("numba").setLevel(logging.WARNING)
34
- limitation = os.getenv("SYSTEM") == "spaces"
35
- #limitation=True
36
- language_dict = tts_order_voice
37
-
38
- authors = ["dacoolkid44", "Hijack", "Maki Ligon", "megaaziib", "KitLemonfoot", "yeey5", "Sui", "MahdeenSky"]
39
-
40
- audio_mode = []
41
- f0method_mode = []
42
- if limitation is True:
43
- f0method_info = "PM is better for testing, RMVPE is better for finalized generations. (Default: RMVPE)"
44
- audio_mode = ["Edge-TTS", "Upload audio", "Record Audio"]
45
- f0method_mode = ["pm", "rmvpe"]
46
- else:
47
- f0method_info = "PM is fast but low quality, crepe and harvest are slow but good quality, RMVPE is the best of both worlds. (Default: RMVPE)"
48
- audio_mode = ["Edge-TTS", "Youtube", "Upload audio", "Record Audio"]
49
- f0method_mode = ["pm", "crepe", "harvest", "rmvpe"]
50
-
51
- #if os.path.isfile("rmvpe.pt"):
52
- # f0method_mode.append("rmvpe")
53
-
54
-
55
- #Eagerload VCs
56
- print("Preloading VCs...")
57
- vcArr=[]
58
- vcArr.append(VC(32000, config))
59
- vcArr.append(VC(40000, config))
60
- vcArr.append(VC(48000, config))
61
-
62
- def infer(name, path, index, vc_audio_mode, vc_input, vc_upload, tts_text, tts_voice, f0_up_key, f0_method, index_rate, filter_radius, resample_sr, rms_mix_rate, protect, record_button):
63
- try:
64
- #Setup audio
65
- audio=None
66
- if vc_audio_mode == "Input path" or "Youtube" and vc_input != "":
67
- audio, sr = librosa.load(vc_input, sr=16000, mono=True)
68
- tts_text = "YouTube Audio"
69
- elif vc_audio_mode == "Upload audio":
70
- if vc_upload is None:
71
- return "Please upload an audio file.", None
72
- sampling_rate, audio = vc_upload
73
- duration = audio.shape[0] / sampling_rate
74
- if duration > 60 and limitation:
75
- return "Too long! Please upload an audio file that is less than 1 minute.", None
76
- audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
77
- if len(audio.shape) > 1:
78
- audio = librosa.to_mono(audio.transpose(1, 0))
79
- if sampling_rate != 16000:
80
- audio = librosa.resample(audio, orig_sr=sampling_rate, target_sr=16000)
81
- tts_text = "Uploaded Audio"
82
- elif vc_audio_mode == "Edge-TTS":
83
- if len(tts_text) > 250 and limitation:
84
- return "Text is too long.", None
85
- if tts_text is None or tts_voice is None or tts_text=="":
86
- return "You need to enter text and select a voice.", None
87
- voice = language_dict[tts_voice]
88
- try:
89
- asyncio.run(edge_tts.Communicate(tts_text, voice).save("tts.mp3"))
90
- except:
91
- print("Failed to get E-TTS handle. A restart may be needed soon.")
92
- return "ERROR: Failed to communicate with Edge-TTS. The Edge-TTS service may be down or cannot communicate. Please try another method or try again later.", None
93
- try:
94
- audio, sr = librosa.load("tts.mp3", sr=16000, mono=True)
95
- except:
96
- return "ERROR: Invalid characters for the chosen TTS speaker. (Change your TTS speaker to one that supports your language!)", None
97
- duration = audio.shape[0] / sr
98
- if duration > 30 and limitation:
99
- return "Your text generated an audio that was too long.", None
100
- vc_input = "tts.mp3"
101
- elif vc_audio_mode == "Record Audio":
102
- if record_button is None:
103
- return "Please record some audio.", None
104
- sampling_rate, audio = record_button
105
- duration = audio.shape[0] / sampling_rate
106
- if duration > 60 and limitation:
107
- return "Too long! Please record an audio file that is less than 1 minute.", None
108
- audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
109
- if len(audio.shape) > 1:
110
- audio = librosa.to_mono(audio.transpose(1, 0))
111
- if sampling_rate != 16000:
112
- audio = librosa.resample(audio, orig_sr=sampling_rate, target_sr=16000)
113
- tts_text = "Recorded Audio"
114
-
115
- if audio is None:
116
- if vc_audio_mode == "Edge-TTS":
117
- print("Failed to get E-TTS handle. A restart may be needed soon.")
118
- return "ERROR: Failed to obtain a correct response from Edge-TTS. The Edge-TTS service may be down or unable to communicate. Please try another method or try again later.", None
119
- return "ERROR: Unknown audio error. Please try again.", None
120
-
121
- times = [0, 0, 0]
122
- f0_up_key = int(f0_up_key)
123
-
124
- #Setup model
125
- cpt = torch.load(f"{path}", map_location="cpu")
126
- tgt_sr = cpt["config"][-1]
127
- cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
128
- if_f0 = cpt.get("f0", 1)
129
- version = cpt.get("version", "v1")
130
- if version == "v1":
131
- if if_f0 == 1:
132
- net_g = SynthesizerTrnMs256NSFsid(*cpt["config"], is_half=config.is_half)
133
- else:
134
- net_g = SynthesizerTrnMs256NSFsid_nono(*cpt["config"])
135
- model_version = "V1"
136
- elif version == "v2":
137
- if if_f0 == 1:
138
- net_g = SynthesizerTrnMs768NSFsid(*cpt["config"], is_half=config.is_half)
139
- else:
140
- net_g = SynthesizerTrnMs768NSFsid_nono(*cpt["config"])
141
- model_version = "V2"
142
- del net_g.enc_q
143
- print(net_g.load_state_dict(cpt["weight"], strict=False))
144
- net_g.eval().to(config.device)
145
- if config.is_half:
146
- net_g = net_g.half()
147
- else:
148
- net_g = net_g.float()
149
- vcIdx = int((tgt_sr/8000)-4)
150
-
151
- #Gen audio
152
- audio_opt = vcArr[vcIdx].pipeline(
153
- hubert_model,
154
- net_g,
155
- 0,
156
- audio,
157
- vc_input,
158
- times,
159
- f0_up_key,
160
- f0_method,
161
- index,
162
- # file_big_npy,
163
- index_rate,
164
- if_f0,
165
- filter_radius,
166
- tgt_sr,
167
- resample_sr,
168
- rms_mix_rate,
169
- version,
170
- protect,
171
- f0_file=None,
172
- )
173
- info = f"[{datetime.now().strftime('%Y-%m-%d %H:%M')}]: npy: {times[0]}, f0: {times[1]}s, infer: {times[2]}s"
174
- print(f"Successful inference with model {name} | {tts_text} | {info}")
175
- del net_g, cpt
176
- return info, (tgt_sr, audio_opt)
177
- except:
178
- info = traceback.format_exc()
179
- print(info)
180
- return info, (None, None)
181
-
182
- def load_model():
183
- categories = []
184
- with open("weights/folder_info.json", "r", encoding="utf-8") as f:
185
- folder_info = json.load(f)
186
- for category_name, category_info in folder_info.items():
187
- if not category_info['enable']:
188
- continue
189
- category_title = category_info['title']
190
- category_folder = category_info['folder_path']
191
- models = []
192
- print(f"Creating category {category_title}...")
193
- with open(f"weights/{category_folder}/model_info.json", "r", encoding="utf-8") as f:
194
- models_info = json.load(f)
195
- for character_name, info in models_info.items():
196
- if not info['enable']:
197
- continue
198
- model_title = info['title']
199
- model_name = info['model_path']
200
- model_author = info.get("author", None)
201
- model_cover = f"weights/{category_folder}/{character_name}/{info['cover']}"
202
- model_index = f"weights/{category_folder}/{character_name}/{info['feature_retrieval_library']}"
203
- if info['feature_retrieval_library'] == "None":
204
- model_index = None
205
- if model_index:
206
- assert os.path.exists(model_index), f"Model {model_title} failed to load index."
207
- if not (model_author in authors or "/" in model_author or "&" in model_author):
208
- authors.append(model_author)
209
- model_path = f"weights/{category_folder}/{character_name}/{model_name}"
210
- cpt = torch.load(f"weights/{category_folder}/{character_name}/{model_name}", map_location="cpu")
211
- model_version = cpt.get("version", "v1")
212
- print(f"Indexed model {model_title} by {model_author} ({model_version})")
213
- models.append((character_name, model_title, model_author, model_cover, model_version, model_path, model_index))
214
- del cpt
215
- categories.append([category_title, category_folder, models])
216
- return categories
217
-
218
- def cut_vocal_and_inst(url, audio_provider, split_model):
219
- if url != "":
220
- if not os.path.exists("dl_audio"):
221
- os.mkdir("dl_audio")
222
- if audio_provider == "Youtube":
223
- ydl_opts = {
224
- 'format': 'bestaudio/best',
225
- 'postprocessors': [{
226
- 'key': 'FFmpegExtractAudio',
227
- 'preferredcodec': 'wav',
228
- }],
229
- "outtmpl": 'dl_audio/youtube_audio',
230
- }
231
- with yt_dlp.YoutubeDL(ydl_opts) as ydl:
232
- ydl.download([url])
233
- audio_path = "dl_audio/youtube_audio.wav"
234
- else:
235
- # Spotify doesnt work.
236
- # Need to find other solution soon.
237
- '''
238
- command = f"spotdl download {url} --output dl_audio/.wav"
239
- result = subprocess.run(command.split(), stdout=subprocess.PIPE)
240
- print(result.stdout.decode())
241
- audio_path = "dl_audio/spotify_audio.wav"
242
- '''
243
- if split_model == "htdemucs":
244
- command = f"demucs --two-stems=vocals {audio_path} -o output"
245
- result = subprocess.run(command.split(), stdout=subprocess.PIPE)
246
- print(result.stdout.decode())
247
- return "output/htdemucs/youtube_audio/vocals.wav", "output/htdemucs/youtube_audio/no_vocals.wav", audio_path, "output/htdemucs/youtube_audio/vocals.wav"
248
- else:
249
- command = f"demucs --two-stems=vocals -n mdx_extra_q {audio_path} -o output"
250
- result = subprocess.run(command.split(), stdout=subprocess.PIPE)
251
- print(result.stdout.decode())
252
- return "output/mdx_extra_q/youtube_audio/vocals.wav", "output/mdx_extra_q/youtube_audio/no_vocals.wav", audio_path, "output/mdx_extra_q/youtube_audio/vocals.wav"
253
- else:
254
- raise gr.Error("URL Required!")
255
- return None, None, None, None
256
-
257
- def combine_vocal_and_inst(audio_data, audio_volume, split_model):
258
- if not os.path.exists("output/result"):
259
- os.mkdir("output/result")
260
- vocal_path = "output/result/output.wav"
261
- output_path = "output/result/combine.mp3"
262
- if split_model == "htdemucs":
263
- inst_path = "output/htdemucs/youtube_audio/no_vocals.wav"
264
- else:
265
- inst_path = "output/mdx_extra_q/youtube_audio/no_vocals.wav"
266
- with wave.open(vocal_path, "w") as wave_file:
267
- wave_file.setnchannels(1)
268
- wave_file.setsampwidth(2)
269
- wave_file.setframerate(audio_data[0])
270
- wave_file.writeframes(audio_data[1].tobytes())
271
- command = f'ffmpeg -y -i {inst_path} -i {vocal_path} -filter_complex [1:a]volume={audio_volume}dB[v];[0:a][v]amix=inputs=2:duration=longest -b:a 320k -c:a libmp3lame {output_path}'
272
- result = subprocess.run(command.split(), stdout=subprocess.PIPE)
273
- print(result.stdout.decode())
274
- return output_path
275
-
276
- def load_hubert():
277
- global hubert_model
278
- models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
279
- ["hubert_base.pt"],
280
- suffix="",
281
- )
282
- hubert_model = models[0]
283
- hubert_model = hubert_model.to(config.device)
284
- if config.is_half:
285
- hubert_model = hubert_model.half()
286
- else:
287
- hubert_model = hubert_model.float()
288
- hubert_model.eval()
289
-
290
- def change_audio_mode(vc_audio_mode):
291
- if vc_audio_mode == "Input path":
292
- return (
293
- # Input & Upload
294
- gr.Textbox.update(visible=True),
295
- gr.Audio.update(visible=False),
296
- # Youtube
297
- gr.Dropdown.update(visible=False),
298
- gr.Textbox.update(visible=False),
299
- gr.Dropdown.update(visible=False),
300
- gr.Button.update(visible=False),
301
- gr.Audio.update(visible=False),
302
- gr.Audio.update(visible=False),
303
- gr.Audio.update(visible=False),
304
- # EdgeTTS
305
- gr.Textbox.update(visible=False),
306
- gr.Dropdown.update(visible=False),
307
- # Record Own
308
- gr.Audio.update(visible=False)
309
- )
310
- elif vc_audio_mode == "Upload audio":
311
- return (
312
- # Input & Upload
313
- gr.Textbox.update(visible=False),
314
- gr.Audio.update(visible=True),
315
- # Youtube
316
- gr.Dropdown.update(visible=False),
317
- gr.Textbox.update(visible=False),
318
- gr.Dropdown.update(visible=False),
319
- gr.Button.update(visible=False),
320
- gr.Audio.update(visible=False),
321
- gr.Audio.update(visible=False),
322
- gr.Audio.update(visible=False),
323
- # EdgeTTS
324
- gr.Textbox.update(visible=False),
325
- gr.Dropdown.update(visible=False),
326
- # Record Own
327
- gr.Audio.update(visible=False)
328
- )
329
- elif vc_audio_mode == "Youtube":
330
- return (
331
- # Input & Upload
332
- gr.Textbox.update(visible=False),
333
- gr.Audio.update(visible=False),
334
- # Youtube
335
- gr.Dropdown.update(visible=True),
336
- gr.Textbox.update(visible=True),
337
- gr.Dropdown.update(visible=True),
338
- gr.Button.update(visible=True),
339
- gr.Audio.update(visible=True),
340
- gr.Audio.update(visible=True),
341
- gr.Audio.update(visible=True),
342
- # TTS
343
- gr.Textbox.update(visible=False),
344
- gr.Dropdown.update(visible=False),
345
- # Record Own
346
- gr.Audio.update(visible=False)
347
- )
348
- elif vc_audio_mode == "Edge-TTS":
349
- return (
350
- # Input & Upload
351
- gr.Textbox.update(visible=False),
352
- gr.Audio.update(visible=False),
353
- # Youtube
354
- gr.Dropdown.update(visible=False),
355
- gr.Textbox.update(visible=False),
356
- gr.Dropdown.update(visible=False),
357
- gr.Button.update(visible=False),
358
- gr.Audio.update(visible=False),
359
- gr.Audio.update(visible=False),
360
- gr.Audio.update(visible=False),
361
- # TTS
362
- gr.Textbox.update(visible=True),
363
- gr.Dropdown.update(visible=True),
364
- # Record Own
365
- gr.Audio.update(visible=False)
366
- )
367
- elif vc_audio_mode == "Record Audio":
368
- return (
369
- # Input & Upload
370
- gr.Textbox.update(visible=False),
371
- gr.Audio.update(visible=False),
372
- # Youtube
373
- gr.Dropdown.update(visible=False),
374
- gr.Textbox.update(visible=False),
375
- gr.Dropdown.update(visible=False),
376
- gr.Button.update(visible=False),
377
- gr.Audio.update(visible=False),
378
- gr.Audio.update(visible=False),
379
- gr.Audio.update(visible=False),
380
- # TTS
381
- gr.Textbox.update(visible=False),
382
- gr.Dropdown.update(visible=False),
383
- # Record Own
384
- gr.Audio.update(visible=True)
385
- )
386
- else:
387
- return (
388
- # Input & Upload
389
- gr.Textbox.update(visible=False),
390
- gr.Audio.update(visible=True),
391
- # Youtube
392
- gr.Dropdown.update(visible=False),
393
- gr.Textbox.update(visible=False),
394
- gr.Dropdown.update(visible=False),
395
- gr.Button.update(visible=False),
396
- gr.Audio.update(visible=False),
397
- gr.Audio.update(visible=False),
398
- gr.Audio.update(visible=False),
399
- # TTS
400
- gr.Textbox.update(visible=False, interactive=True),
401
- gr.Dropdown.update(visible=False, interactive=True),
402
- # Record Own
403
- gr.Audio.update(visible=False)
404
- )
405
-
406
- if __name__ == '__main__':
407
- load_hubert()
408
- categories = load_model()
409
- voices = list(language_dict.keys())
410
-
411
- #Gradio preloading
412
- vc_audio_mode = gr.Dropdown(label="Input voice", choices=audio_mode, allow_custom_value=False, value="Edge-TTS")
413
- # Input and Upload
414
- vc_input = gr.Textbox(label="Input audio path", visible=False)
415
- vc_upload = gr.Audio(label="Upload audio file", visible=False, interactive=True)
416
- # Youtube
417
- vc_download_audio = gr.Dropdown(label="Provider", choices=["Youtube"], allow_custom_value=False, visible=False, value="Youtube", info="Select provider (Default: Youtube)")
418
- vc_link = gr.Textbox(label="Youtube URL", visible=False, info="Example: https://www.youtube.com/watch?v=Nc0sB1Bmf-A", placeholder="https://www.youtube.com/watch?v=...")
419
- vc_split_model = gr.Dropdown(label="Splitter Model", choices=["htdemucs", "mdx_extra_q"], allow_custom_value=False, visible=False, value="htdemucs", info="Select the splitter model (Default: htdemucs)")
420
- vc_split = gr.Button("Split Audio", variant="primary", visible=False)
421
- vc_vocal_preview = gr.Audio(label="Vocal Preview", visible=False)
422
- vc_inst_preview = gr.Audio(label="Instrumental Preview", visible=False)
423
- vc_audio_preview = gr.Audio(label="Audio Preview", visible=False)
424
- # TTS
425
- tts_text = gr.Textbox(visible=True, label="TTS text", info="Text to speech input (There is a limit of 250 characters)", interactive=True)
426
- tts_voice = gr.Dropdown(label="Edge-tts speaker", choices=voices, visible=True, allow_custom_value=False, value="English-Ana (Female)", interactive=True)
427
- # Record Own
428
- record_button = gr.Audio(source="microphone", label="Record your own audio", visible=False, interactive=True)
429
- vc_transform0 = gr.Number(label="Transpose", value=0, info='Type "12" to change from male to female voice. Type "-12" to change female to male voice')
430
- f0method0 = gr.Radio(
431
- label="Pitch extraction algorithm",
432
- info=f0method_info,
433
- choices=f0method_mode,
434
- value="pm",
435
- interactive=True
436
- )
437
- index_rate1 = gr.Slider(
438
- minimum=0,
439
- maximum=1,
440
- label="Retrieval feature ratio",
441
- info="Accent control. Too high will usually sound too robotic. (Default: 0.4)",
442
- value=0.4,
443
- interactive=True,
444
- )
445
- filter_radius0 = gr.Slider(
446
- minimum=0,
447
- maximum=7,
448
- label="Apply Median Filtering",
449
- info="The value represents the filter radius and can reduce breathiness.",
450
- value=1,
451
- step=1,
452
- interactive=True,
453
- )
454
- resample_sr0 = gr.Slider(
455
- minimum=0,
456
- maximum=48000,
457
- label="Resample the output audio",
458
- info="Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling.",
459
- value=0,
460
- step=1,
461
- interactive=True,
462
- )
463
- rms_mix_rate0 = gr.Slider(
464
- minimum=0,
465
- maximum=1,
466
- label="Volume Envelope",
467
- info="Use the volume envelope of the input to replace or mix with the volume envelope of the output. The closer the ratio is to 1, the more the output envelope is used",
468
- value=1,
469
- interactive=True,
470
- )
471
- protect0 = gr.Slider(
472
- minimum=0,
473
- maximum=0.5,
474
- label="Voice Protection",
475
- info="Protect voiceless consonants and breath sounds to prevent artifacts such as tearing in electronic music. Set to 0.5 to disable. Decrease the value to increase protection, but it may reduce indexing accuracy",
476
- value=0.23,
477
- step=0.01,
478
- interactive=True,
479
- )
480
-
481
- with gr.Blocks(theme=gr.themes.Base()) as app:
482
- gr.Markdown(
483
- "# <center> VTuber RVC Models\n"
484
- "### <center> Space by Kit Lemonfoot / Noel Shirogane's High Flying Birds"
485
- "<center> Original space by megaaziib & zomehwh\n"
486
- "### <center> Please credit the original model authors if you use this Space."
487
- "<center>Do no evil.\n\n"
488
- "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1Til3SY7-X0x3Wss3YXlgfq8go39DzWHk)\n\n"
489
- )
490
- gr.Markdown("<center> Looking for more models? <a href=\"https://docs.google.com/spreadsheets/d/1tvZSggOsZGAPjbMrWOAAaoJJFpJuQlwUEQCf5x1ssO8\">Check out the VTuber AI Model Tracking spreadsheet!</a>")
491
- for (folder_title, folder, models) in categories:
492
- with gr.TabItem(folder_title):
493
- with gr.Tabs():
494
- if not models:
495
- gr.Markdown("# <center> No Model Loaded.")
496
- gr.Markdown("## <center> Please add model or fix your model path.")
497
- continue
498
- for (name, title, author, cover, model_version, model_path, model_index) in models:
499
- with gr.TabItem(name):
500
- with gr.Row():
501
- gr.Markdown(
502
- '<div align="center">'
503
- f'<div>{title}</div>\n'+
504
- f'<div>RVC {model_version} Model</div>\n'+
505
- (f'<div>Model author: {author}</div>' if author else "")+
506
- (f'<img style="width:auto;height:300px;" src="file/{cover}">' if cover else "")+
507
- '</div>'
508
- )
509
- with gr.Column():
510
- vc_log = gr.Textbox(label="Output Information", interactive=False)
511
- vc_output = gr.Audio(label="Output Audio", interactive=False)
512
- #This is a fucking stupid solution but Gradio refuses to pass in values unless I do this.
513
- vc_name = gr.Textbox(value=title, visible=False, interactive=False)
514
- vc_mp = gr.Textbox(value=model_path, visible=False, interactive=False)
515
- vc_mi = gr.Textbox(value=model_index, visible=False, interactive=False)
516
- vc_convert = gr.Button("Convert", variant="primary")
517
-
518
- vc_convert.click(
519
- fn=infer,
520
- inputs=[
521
- vc_name,
522
- vc_mp,
523
- vc_mi,
524
- vc_audio_mode,
525
- vc_input,
526
- vc_upload,
527
- tts_text,
528
- tts_voice,
529
- vc_transform0,
530
- f0method0,
531
- index_rate1,
532
- filter_radius0,
533
- resample_sr0,
534
- rms_mix_rate0,
535
- protect0,
536
- record_button
537
- ],
538
- outputs=[vc_log, vc_output]
539
- )
540
-
541
- with gr.Row():
542
- with gr.Column():
543
- vc_audio_mode.render()
544
- vc_input.render()
545
- vc_upload.render()
546
- # Youtube
547
- vc_download_audio.render()
548
- vc_link.render()
549
- vc_split_model.render()
550
- vc_split.render()
551
- vc_vocal_preview.render()
552
- vc_inst_preview.render()
553
- vc_audio_preview.render()
554
- # TTS
555
- tts_text.render()
556
- tts_voice.render()
557
- # Record Own
558
- record_button.render()
559
- with gr.Column():
560
- vc_transform0.render()
561
- f0method0.render()
562
- index_rate1.render()
563
- with gr.Accordion("Advanced Options", open=False):
564
- filter_radius0.render()
565
- resample_sr0.render()
566
- rms_mix_rate0.render()
567
- protect0.render()
568
-
569
- vc_split.click(
570
- fn=cut_vocal_and_inst,
571
- inputs=[vc_link, vc_download_audio, vc_split_model],
572
- outputs=[vc_vocal_preview, vc_inst_preview, vc_audio_preview, vc_input]
573
- )
574
- vc_audio_mode.change(
575
- fn=change_audio_mode,
576
- inputs=[vc_audio_mode],
577
- outputs=[
578
- vc_input,
579
- vc_upload,
580
- vc_download_audio,
581
- vc_link,
582
- vc_split_model,
583
- vc_split,
584
- vc_vocal_preview,
585
- vc_inst_preview,
586
- vc_audio_preview,
587
-
588
- tts_text,
589
- tts_voice,
590
- record_button
591
- ]
592
- )
593
- authStr=", ".join(authors)
594
- gr.Markdown(
595
- "## <center>Credit to:\n"
596
- "#### <center>Original devs:\n"
597
- "<center>the RVC Project, lj1995, zomehwh, sysf\n\n"
598
- "#### <center>Model creators:\n"
599
- f"<center>{authStr}\n"
600
- )
601
- if limitation is True:
602
- app.queue(concurrency_count=1, max_size=20, api_open=config.api).launch(share=config.colab)
603
- else:
604
- app.queue(concurrency_count=1, max_size=20, api_open=config.api).launch(share=True)
 
1
+ print("Starting up. Please be patient...")
2
+
3
+ import os
4
+ import glob
5
+ import json
6
+ import traceback
7
+ import logging
8
+ import gradio as gr
9
+ import numpy as np
10
+ import librosa
11
+ import torch
12
+ import asyncio
13
+ import edge_tts
14
+ import yt_dlp
15
+ import ffmpeg
16
+ import subprocess
17
+ import sys
18
+ import io
19
+ import wave
20
+ from datetime import datetime
21
+ from fairseq import checkpoint_utils
22
+ from lib.infer_pack.models import (
23
+ SynthesizerTrnMs256NSFsid,
24
+ SynthesizerTrnMs256NSFsid_nono,
25
+ SynthesizerTrnMs768NSFsid,
26
+ SynthesizerTrnMs768NSFsid_nono,
27
+ )
28
+ from vc_infer_pipeline import VC
29
+ from config import Config
30
+ from edgetts_db import tts_order_voice
31
+
32
+ #fuck intel
33
+ os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
34
+
35
+ config = Config()
36
+ logging.getLogger("numba").setLevel(logging.WARNING)
37
+ limitation = os.getenv("SYSTEM") == "spaces"
38
+ #limitation=True
39
+ language_dict = tts_order_voice
40
+
41
+ authors = ["dacoolkid44", "Hijack", "Maki Ligon", "megaaziib", "Kit Lemonfoot", "yeey5", "Sui", "MahdeenSky"]
42
+
43
+ f0method_mode = []
44
+ if limitation is True:
45
+ f0method_info = "PM is better for testing, RMVPE is better for finalized generations. (Default: PM)"
46
+ f0method_mode = ["pm", "rmvpe"]
47
+ else:
48
+ f0method_info = "PM is fast but low quality, crepe and harvest are slow but good quality, RMVPE is the best of both worlds. (Default: PM)"
49
+ f0method_mode = ["pm", "crepe", "harvest", "rmvpe"]
50
+
51
+ #Eagerload VCs
52
+ print("Preloading VCs...")
53
+ vcArr=[]
54
+ vcArr.append(VC(32000, config))
55
+ vcArr.append(VC(40000, config))
56
+ vcArr.append(VC(48000, config))
57
+
58
+ def infer(name, path, index, vc_input, vc_upload, tts_text, tts_voice, f0_up_key, f0_method, index_rate, filter_radius, resample_sr, rms_mix_rate, protect):
59
+ try:
60
+ #Setup audio
61
+ audio=None
62
+ #Determine audio mode
63
+ #TTS takes priority over uploads.
64
+ #Uploads takes priority over paths.
65
+ vc_audio_mode = ""
66
+ #Edge-TTS
67
+ if(tts_text):
68
+ vc_audio_mode = "ETTS"
69
+ if len(tts_text) > 250 and limitation:
70
+ return "Text is too long.", None
71
+ if tts_text is None or tts_voice is None or tts_text=="":
72
+ return "You need to enter text and select a voice.", None
73
+ voice = language_dict[tts_voice]
74
+ try:
75
+ asyncio.run(edge_tts.Communicate(tts_text, voice).save("tts.mp3"))
76
+ except:
77
+ print("Failed to get E-TTS handle. A restart may be needed soon.")
78
+ return "ERROR: Failed to communicate with Edge-TTS. The Edge-TTS service may be down or cannot communicate. Please try another method or try again later.", None
79
+ try:
80
+ audio, sr = librosa.load("tts.mp3", sr=16000, mono=True)
81
+ except:
82
+ return "ERROR: Invalid characters for the chosen TTS speaker. (Change your TTS speaker to one that supports your language!)", None
83
+ duration = audio.shape[0] / sr
84
+ if duration > 30 and limitation:
85
+ return "Your text generated an audio that was too long.", None
86
+ vc_input = "tts.mp3"
87
+ #File upload
88
+ elif(vc_upload):
89
+ vc_audio_mode = "Upload"
90
+ sampling_rate, audio = vc_upload
91
+ duration = audio.shape[0] / sampling_rate
92
+ if duration > 60 and limitation:
93
+ return "Too long! Please upload an audio file that is less than 1 minute.", None
94
+ audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
95
+ if len(audio.shape) > 1:
96
+ audio = librosa.to_mono(audio.transpose(1, 0))
97
+ if sampling_rate != 16000:
98
+ audio = librosa.resample(audio, orig_sr=sampling_rate, target_sr=16000)
99
+ tts_text = "Uploaded Audio"
100
+ #YouTube or path
101
+ elif(vc_input):
102
+ audio, sr = librosa.load(vc_input, sr=16000, mono=True)
103
+ vc_audio_mode = "YouTube"
104
+ tts_text = "YouTube Audio"
105
+ else:
106
+ return "Please upload or choose some type of audio.", None
107
+
108
+ if audio is None:
109
+ if vc_audio_mode == "ETTS":
110
+ print("Failed to get E-TTS handle. A restart may be needed soon.")
111
+ return "ERROR: Failed to obtain a correct response from Edge-TTS. The Edge-TTS service may be down or unable to communicate. Please try another method or try again later.", None
112
+ return "ERROR: Unknown audio error. Please try again.", None
113
+
114
+ times = [0, 0, 0]
115
+ f0_up_key = int(f0_up_key)
116
+
117
+
118
+ print(config.device)
119
+ #Setup model
120
+ cpt = torch.load(f"{path}", map_location="cpu")
121
+ tgt_sr = cpt["config"][-1]
122
+ cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
123
+ if_f0 = cpt.get("f0", 1)
124
+ version = cpt.get("version", "v1")
125
+ if version == "v1":
126
+ if if_f0 == 1:
127
+ net_g = SynthesizerTrnMs256NSFsid(*cpt["config"], is_half=config.is_half)
128
+ else:
129
+ net_g = SynthesizerTrnMs256NSFsid_nono(*cpt["config"])
130
+ model_version = "V1"
131
+ elif version == "v2":
132
+ if if_f0 == 1:
133
+ net_g = SynthesizerTrnMs768NSFsid(*cpt["config"], is_half=config.is_half)
134
+ else:
135
+ net_g = SynthesizerTrnMs768NSFsid_nono(*cpt["config"])
136
+ model_version = "V2"
137
+ del net_g.enc_q
138
+ print(net_g.load_state_dict(cpt["weight"], strict=False))
139
+ net_g.eval().to(config.device)
140
+ if config.is_half:
141
+ net_g = net_g.half()
142
+ else:
143
+ net_g = net_g.float()
144
+ vcIdx = int((tgt_sr/8000)-4)
145
+
146
+ #Gen audio
147
+ audio_opt = vcArr[vcIdx].pipeline(
148
+ hubert_model,
149
+ net_g,
150
+ 0,
151
+ audio,
152
+ vc_input,
153
+ times,
154
+ f0_up_key,
155
+ f0_method,
156
+ index,
157
+ # file_big_npy,
158
+ index_rate,
159
+ if_f0,
160
+ filter_radius,
161
+ tgt_sr,
162
+ resample_sr,
163
+ rms_mix_rate,
164
+ version,
165
+ protect,
166
+ f0_file=None,
167
+ )
168
+ info = f"[{datetime.now().strftime('%Y-%m-%d %H:%M')}]: npy: {times[0]}, f0: {times[1]}s, infer: {times[2]}s"
169
+ print(f"Successful inference with model {name} | {tts_text} | {info}")
170
+ del net_g, cpt
171
+ return info, (tgt_sr, audio_opt)
172
+ except:
173
+ info = traceback.format_exc()
174
+ print(info)
175
+ return info, (None, None)
176
+
177
+ def load_model():
178
+ categories = []
179
+ with open("weights/folder_info.json", "r", encoding="utf-8") as f:
180
+ folder_info = json.load(f)
181
+ for category_name, category_info in folder_info.items():
182
+ if not category_info['enable']:
183
+ continue
184
+ category_title = category_info['title']
185
+ category_folder = category_info['folder_path']
186
+ models = []
187
+ print(f"Creating category {category_title}...")
188
+ with open(f"weights/{category_folder}/model_info.json", "r", encoding="utf-8") as f:
189
+ models_info = json.load(f)
190
+ for character_name, info in models_info.items():
191
+ if not info['enable']:
192
+ continue
193
+ model_title = info['title']
194
+ model_name = info['model_path']
195
+ model_author = info.get("author", None)
196
+ model_cover = f"weights/{category_folder}/{character_name}/{info['cover']}"
197
+ model_index = f"weights/{category_folder}/{character_name}/{info['feature_retrieval_library']}"
198
+ if info['feature_retrieval_library'] == "None":
199
+ model_index = None
200
+ if model_index:
201
+ assert os.path.exists(model_index), f"Model {model_title} failed to load index."
202
+ if not (model_author in authors or "/" in model_author or "&" in model_author):
203
+ authors.append(model_author)
204
+ model_path = f"weights/{category_folder}/{character_name}/{model_name}"
205
+ cpt = torch.load(f"weights/{category_folder}/{character_name}/{model_name}", map_location="cpu")
206
+ model_version = cpt.get("version", "v1")
207
+ print(f"Indexed model {model_title} by {model_author} ({model_version})")
208
+ models.append((character_name, model_title, model_author, model_cover, model_version, model_path, model_index))
209
+ del cpt
210
+ categories.append([category_title, category_folder, models])
211
+ return categories
212
+
213
+ def cut_vocal_and_inst(url, audio_provider, split_model):
214
+ if url != "":
215
+ if not os.path.exists("dl_audio"):
216
+ os.mkdir("dl_audio")
217
+ if audio_provider == "Youtube":
218
+ ydl_opts = {
219
+ 'format': 'bestaudio/best',
220
+ 'postprocessors': [{
221
+ 'key': 'FFmpegExtractAudio',
222
+ 'preferredcodec': 'wav',
223
+ }],
224
+ "outtmpl": 'dl_audio/youtube_audio',
225
+ }
226
+ with yt_dlp.YoutubeDL(ydl_opts) as ydl:
227
+ ydl.download([url])
228
+ audio_path = "dl_audio/youtube_audio.wav"
229
+ else:
230
+ # Spotify doesnt work.
231
+ # Need to find other solution soon.
232
+ '''
233
+ command = f"spotdl download {url} --output dl_audio/.wav"
234
+ result = subprocess.run(command.split(), stdout=subprocess.PIPE)
235
+ print(result.stdout.decode())
236
+ audio_path = "dl_audio/spotify_audio.wav"
237
+ '''
238
+ if split_model == "htdemucs":
239
+ command = f"demucs --two-stems=vocals {audio_path} -o output"
240
+ result = subprocess.run(command.split(), stdout=subprocess.PIPE)
241
+ print(result.stdout.decode())
242
+ return "output/htdemucs/youtube_audio/vocals.wav", "output/htdemucs/youtube_audio/no_vocals.wav", audio_path, "output/htdemucs/youtube_audio/vocals.wav"
243
+ else:
244
+ command = f"demucs --two-stems=vocals -n mdx_extra_q {audio_path} -o output"
245
+ result = subprocess.run(command.split(), stdout=subprocess.PIPE)
246
+ print(result.stdout.decode())
247
+ return "output/mdx_extra_q/youtube_audio/vocals.wav", "output/mdx_extra_q/youtube_audio/no_vocals.wav", audio_path, "output/mdx_extra_q/youtube_audio/vocals.wav"
248
+ else:
249
+ raise gr.Error("URL Required!")
250
+ return None, None, None, None
251
+
252
+ def load_hubert():
253
+ global hubert_model
254
+ models, _, _ = checkpoint_utils.load_model_ensemble_and_task(
255
+ ["hubert_base.pt"],
256
+ suffix="",
257
+ )
258
+ hubert_model = models[0]
259
+ hubert_model = hubert_model.to(config.device)
260
+ if config.is_half:
261
+ hubert_model = hubert_model.half()
262
+ else:
263
+ hubert_model = hubert_model.float()
264
+ hubert_model.eval()
265
+
266
+ if __name__ == '__main__':
267
+ load_hubert()
268
+ categories = load_model()
269
+ voices = list(language_dict.keys())
270
+
271
+ # Gradio preloading
272
+ # Input and Upload
273
+ vc_upload = gr.Audio(label="Upload or record an audio file", interactive=True)
274
+ # Youtube
275
+ vc_input = gr.Textbox(label="Input audio path", visible=False)
276
+ vc_download_audio = gr.Dropdown(label="Provider", choices=["Youtube"], allow_custom_value=False, value="Youtube", info="Select provider (Default: Youtube)")
277
+ vc_link = gr.Textbox(label="Youtube URL", info="Example: https://www.youtube.com/watch?v=Nc0sB1Bmf-A", placeholder="https://www.youtube.com/watch?v=...")
278
+ vc_split_model = gr.Dropdown(label="Splitter Model", choices=["htdemucs", "mdx_extra_q"], allow_custom_value=False, value="htdemucs", info="Select the splitter model (Default: htdemucs)")
279
+ vc_split = gr.Button("Split Audio", variant="primary")
280
+ vc_vocal_preview = gr.Audio(label="Vocal Preview")
281
+ vc_inst_preview = gr.Audio(label="Instrumental Preview")
282
+ vc_audio_preview = gr.Audio(label="Audio Preview")
283
+ # TTS
284
+ tts_text = gr.Textbox(label="TTS text", info="Text to speech input (There is a limit of 250 characters)", interactive=True)
285
+ tts_voice = gr.Dropdown(label="Edge-TTS speaker", choices=voices, allow_custom_value=False, value="English-Ana (Female)", interactive=True)
286
+ # Other settings
287
+ vc_transform0 = gr.Number(label="Transpose", value=0, info='Type "12" to change from male to female voice. Type "-12" to change female to male voice')
288
+ f0method0 = gr.Radio(
289
+ label="Pitch extraction algorithm",
290
+ info=f0method_info,
291
+ choices=f0method_mode,
292
+ value="pm",
293
+ interactive=True
294
+ )
295
+ index_rate1 = gr.Slider(
296
+ minimum=0,
297
+ maximum=1,
298
+ label="Retrieval feature ratio",
299
+ info="Accent control. Too high will usually sound too robotic. (Default: 0.4)",
300
+ value=0.4,
301
+ interactive=True,
302
+ )
303
+ filter_radius0 = gr.Slider(
304
+ minimum=0,
305
+ maximum=7,
306
+ label="Apply Median Filtering",
307
+ info="The value represents the filter radius and can reduce breathiness.",
308
+ value=1,
309
+ step=1,
310
+ interactive=True,
311
+ )
312
+ resample_sr0 = gr.Slider(
313
+ minimum=0,
314
+ maximum=48000,
315
+ label="Resample the output audio",
316
+ info="Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling.",
317
+ value=0,
318
+ step=1,
319
+ interactive=True,
320
+ )
321
+ rms_mix_rate0 = gr.Slider(
322
+ minimum=0,
323
+ maximum=1,
324
+ label="Volume Envelope",
325
+ info="Use the volume envelope of the input to replace or mix with the volume envelope of the output. The closer the ratio is to 1, the more the output envelope is used",
326
+ value=1,
327
+ interactive=True,
328
+ )
329
+ protect0 = gr.Slider(
330
+ minimum=0,
331
+ maximum=0.5,
332
+ label="Voice Protection",
333
+ info="Protect voiceless consonants and breath sounds to prevent artifacts such as tearing in electronic music. Set to 0.5 to disable. Decrease the value to increase protection, but it may reduce indexing accuracy",
334
+ value=0.23,
335
+ step=0.01,
336
+ interactive=True,
337
+ )
338
+
339
+ with gr.Blocks(theme=gr.themes.Base()) as app:
340
+ gr.Markdown(
341
+ "# <center> VTuber RVC Models\n"
342
+ "### <center> Space by Kit Lemonfoot / Noel Shirogane's High Flying Birds"
343
+ "<center> Original space by megaaziib & zomehwh\n"
344
+ "### <center> Please credit the original model authors if you use this Space."
345
+ "<center>Do no evil.\n\n"
346
+ "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1Til3SY7-X0x3Wss3YXlgfq8go39DzWHk)\n\n"
347
+ )
348
+ gr.Markdown("<center> Looking for more models? <a href=\"https://docs.google.com/spreadsheets/d/1tvZSggOsZGAPjbMrWOAAaoJJFpJuQlwUEQCf5x1ssO8\">Check out the VTuber AI Model Tracking spreadsheet!</a>")
349
+ for (folder_title, folder, models) in categories:
350
+ with gr.TabItem(folder_title):
351
+ with gr.Tabs():
352
+ if not models:
353
+ gr.Markdown("# <center> No Model Loaded.")
354
+ gr.Markdown("## <center> Please add model or fix your model path.")
355
+ continue
356
+ for (name, title, author, cover, model_version, model_path, model_index) in models:
357
+ with gr.TabItem(name):
358
+ with gr.Row():
359
+ with gr.Column():
360
+ gr.Markdown(
361
+ '<div align="center">'
362
+ f'<div>{title}</div>\n'+
363
+ f'<div>RVC {model_version} Model</div>\n'+
364
+ (f'<div>Model author: {author}</div>' if author else "")+
365
+ (f'<img style="width:auto;height:300px;" src="file/{cover}"></img>' if cover else "")+
366
+ '</div>'
367
+ )
368
+ with gr.Column():
369
+ vc_log = gr.Textbox(label="Output Information", interactive=False)
370
+ vc_output = gr.Audio(label="Output Audio", interactive=False)
371
+ #This is a fucking stupid solution but Gradio refuses to pass in values unless I do this.
372
+ vc_name = gr.Textbox(value=title, visible=False, interactive=False)
373
+ vc_mp = gr.Textbox(value=model_path, visible=False, interactive=False)
374
+ vc_mi = gr.Textbox(value=model_index, visible=False, interactive=False)
375
+ vc_convert = gr.Button("Convert", variant="primary")
376
+
377
+ vc_convert.click(
378
+ fn=infer,
379
+ inputs=[
380
+ vc_name,
381
+ vc_mp,
382
+ vc_mi,
383
+ vc_input,
384
+ vc_upload,
385
+ tts_text,
386
+ tts_voice,
387
+ vc_transform0,
388
+ f0method0,
389
+ index_rate1,
390
+ filter_radius0,
391
+ resample_sr0,
392
+ rms_mix_rate0,
393
+ protect0
394
+ ],
395
+ outputs=[vc_log, vc_output]
396
+ )
397
+
398
+ with gr.Row():
399
+ with gr.Column():
400
+ with gr.Tab("Edge-TTS"):
401
+ tts_text.render()
402
+ tts_voice.render()
403
+ with gr.Tab("Upload/Record"):
404
+ vc_input.render()
405
+ vc_upload.render()
406
+ if(not limitation):
407
+ with gr.Tab("YouTube"):
408
+ vc_download_audio.render()
409
+ vc_link.render()
410
+ vc_split_model.render()
411
+ vc_split.render()
412
+ vc_vocal_preview.render()
413
+ vc_inst_preview.render()
414
+ vc_audio_preview.render()
415
+ with gr.Column():
416
+ vc_transform0.render()
417
+ f0method0.render()
418
+ index_rate1.render()
419
+ with gr.Accordion("Advanced Options", open=False):
420
+ filter_radius0.render()
421
+ resample_sr0.render()
422
+ rms_mix_rate0.render()
423
+ protect0.render()
424
+
425
+ vc_split.click(
426
+ fn=cut_vocal_and_inst,
427
+ inputs=[vc_link, vc_download_audio, vc_split_model],
428
+ outputs=[vc_vocal_preview, vc_inst_preview, vc_audio_preview, vc_input]
429
+ )
430
+
431
+ authStr=", ".join(authors)
432
+ gr.Markdown(
433
+ "## <center>Credit to:\n"
434
+ "#### <center>Original devs:\n"
435
+ "<center>the RVC Project, lj1995, zomehwh, sysf\n\n"
436
+ "#### <center>Model creators:\n"
437
+ f"<center>{authStr}\n"
438
+ )
439
+
440
+ if limitation is True:
441
+ app.queue(max_size=20, api_open=config.api).launch(allowed_paths=["/"])
442
+ else:
443
+ app.queue(max_size=20, api_open=config.api).launch(allowed_paths=["/"], share=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
requirements.txt CHANGED
@@ -1,21 +1,22 @@
1
- wheel
2
- setuptools
3
- ffmpeg
4
- numba==0.56.4
5
- numpy==1.23.5
6
- scipy==1.9.3
7
- librosa==0.9.1
8
- fairseq==0.12.2
9
- faiss-cpu==1.7.3
10
- gradio==3.36.1
11
- pyworld>=0.3.2
12
- soundfile>=0.12.1
13
- praat-parselmouth>=0.4.2
14
- httpx==0.23.0
15
- tensorboard
16
- tensorboardX
17
- torchcrepe
18
- onnxruntime
19
- demucs
20
- edge-tts
21
- yt_dlp
 
 
1
+ wheel
2
+ setuptools
3
+ ffmpeg
4
+ torch
5
+ numba==0.56.4
6
+ numpy==1.23.5
7
+ scipy==1.9.3
8
+ librosa==0.9.1
9
+ fairseq==0.12.2
10
+ faiss-cpu==1.7.3
11
+ gradio==4.36.0
12
+ pyworld>=0.3.2
13
+ soundfile>=0.12.1
14
+ praat-parselmouth>=0.4.2
15
+ httpx==0.23.0
16
+ tensorboard
17
+ tensorboardX
18
+ torchcrepe
19
+ onnxruntime
20
+ demucs
21
+ edge-tts
22
+ yt_dlp
weights/hololive-en/Gura/cover.png CHANGED
weights/hololive-id/Zeta/cover.png CHANGED

Git LFS Details

  • SHA256: f0239284b4ea35b287993244f3fb9bbe913ad5e61b9aeb584ba497cd79d573cc
  • Pointer size: 131 Bytes
  • Size of remote file: 143 kB

Git LFS Details

  • SHA256: a3bfa12cbdc1b793d5c10b23152ff29580043e95a5a641d3164d48d6be15df02
  • Pointer size: 131 Bytes
  • Size of remote file: 143 kB
weights/hololive-jp/Botan/cover.png CHANGED
weights/hololive-jp/Laplus/cover.png CHANGED
weights/phaseconnect/Runie/Runie_Sxndypz.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb5a6201784c8775eb84621781c98cbdaded3ecbc22195f3c3fec3c5d73eddcc
3
+ size 56234054
weights/phaseconnect/Runie/added_IVF1386_Flat_nprobe_1_runie_v2_mbkm.index ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1fa4e96ced760edfde27823002936ac58aca0b65c720c21b2882cc3bf881a5ee
3
+ size 31588619
weights/phaseconnect/Runie/cover.png ADDED
weights/phaseconnect/model_info.json CHANGED
@@ -1,154 +1,162 @@
1
- {
2
- "Pippa": {
3
- "enable": true,
4
- "model_path": "Pippa_Pianissimo.pth",
5
- "title": "Pipkin Pippa",
6
- "cover": "cover.png",
7
- "feature_retrieval_library": "added_IVF2367_Flat_nprobe_1_pippa-clean1_v2_mbkm.index",
8
- "author": "Pianissimo"
9
- },
10
- "Tenma": {
11
- "enable": true,
12
- "model_path": "Tenma_MahdeenSky.pth",
13
- "title": "Maemi Tenma",
14
- "cover": "cover.png",
15
- "feature_retrieval_library": "added_IVF733_Flat_nprobe_1_MaemiTenma_v2.index",
16
- "author": "MahdeenSky"
17
- },
18
- "Lia": {
19
- "enable": true,
20
- "model_path": "Lia_KitLemonfoot.pth",
21
- "title": "Rinkou Ashelia",
22
- "cover": "cover.png",
23
- "feature_retrieval_library": "added_IVF256_Flat_nprobe_1_RinkouAshelia_Speaking_KitLemonfoot_v2.index",
24
- "author": "Kit Lemonfoot / NSHFB"
25
- },
26
- "Nasa": {
27
- "enable": true,
28
- "model_path": "Nasa_Sxndypz.pth",
29
- "title": "Utatane Nasa",
30
- "cover": "cover.png",
31
- "feature_retrieval_library": "added_IVF978_Flat_nprobe_1_nasa_v2_mbkm.index",
32
- "author": "Sxndypz"
33
- },
34
- "Uruka": {
35
- "enable": true,
36
- "model_path": "Uruka_RavenCutie21.pth",
37
- "title": "Fujikura Uruka",
38
- "cover": "cover.png",
39
- "feature_retrieval_library": "added_IVF1156_Flat_nprobe_1_Uruka_v2.index",
40
- "author": "RavenCutie21"
41
- },
42
- "Dizzy": {
43
- "enable": true,
44
- "model_path": "Dizzy_Sxndypz.pth",
45
- "title": "Dizzy Dokuro",
46
- "cover": "cover.png",
47
- "feature_retrieval_library": "added_IVF1049_Flat_nprobe_1_dizzydokuro_v2_mbkm.index",
48
- "author": "Sxndypz"
49
- },
50
- "Jelly": {
51
- "enable": true,
52
- "model_path": "Jelly_Sxndypz.pth",
53
- "title": "Jelly Hoshiumi",
54
- "cover": "cover.png",
55
- "feature_retrieval_library": "added_IVF1304_Flat_nprobe_1_jellyhoshiumi_v2_mbkm.index",
56
- "author": "Sxndypz"
57
- },
58
- "Ember": {
59
- "enable": true,
60
- "model_path": "Ember_RavenCutie21.pth",
61
- "title": "Ember Amane",
62
- "cover": "cover.png",
63
- "feature_retrieval_library": "added_IVF1134_Flat_nprobe_1_Ember_v2.index",
64
- "author": "RavenCutie21"
65
- },
66
- "Remilia": {
67
- "enable": true,
68
- "model_path": "Remilia_Sxndypz.pth",
69
- "title": "Remilia Nephys",
70
- "cover": "cover.png",
71
- "feature_retrieval_library": "added_IVF1080_Flat_nprobe_1_remiliav2_v2_mbkm.index",
72
- "author": "Sxndypz"
73
- },
74
- "Airi": {
75
- "enable": true,
76
- "model_path": "Airi_HinaBl.pth",
77
- "title": "Chisaka Airi",
78
- "cover": "cover.png",
79
- "feature_retrieval_library": "added_IVF256_Flat_nprobe_1_chisaka-airi_v2.index",
80
- "author": "HinaBl"
81
- },
82
- "Shiina": {
83
- "enable": true,
84
- "model_path": "Shiina_Sxndypz.pth",
85
- "title": "Amanogawa Shiina",
86
- "cover": "cover.png",
87
- "feature_retrieval_library": "added_IVF1069_Flat_nprobe_1_shiina_32k_v2_mbkm.index",
88
- "author": "Sxndypz"
89
- },
90
- "Rie": {
91
- "enable": true,
92
- "model_path": "Rie_Sxndypz.pth",
93
- "title": "Himemiya Rie",
94
- "cover": "cover.png",
95
- "feature_retrieval_library": "added_IVF768_Flat_nprobe_1_himemiya_rie_v2.index",
96
- "author": "Sxndypz"
97
- },
98
- "Erina": {
99
- "enable": true,
100
- "model_path": "Erina_RavenCutie21.pth",
101
- "title": "Erina Makina",
102
- "cover": "cover.png",
103
- "feature_retrieval_library": "added_IVF931_Flat_nprobe_1_Erina_v2.index",
104
- "author": "RavenCutie21"
105
- },
106
- "Panko": {
107
- "enable": true,
108
- "model_path": "Panko_Sxndypz.pth",
109
- "title": "Komachi Panko",
110
- "cover": "cover.png",
111
- "feature_retrieval_library": "added_IVF764_Flat_nprobe_1_komachipanko_v2.index",
112
- "author": "Sxndypz"
113
- },
114
- "Saya": {
115
- "enable": true,
116
- "model_path": "Saya_Sxndypz.pth",
117
- "title": "Saya Sairroxs",
118
- "cover": "cover.png",
119
- "feature_retrieval_library": "added_IVF1271_Flat_nprobe_1_saya_v2_mbkm.index",
120
- "author": "Sxndypz"
121
- },
122
- "Muyu": {
123
- "enable": true,
124
- "model_path": "Muyu_Sxndypz.pth",
125
- "title": "Muu Muyu",
126
- "cover": "cover.png",
127
- "feature_retrieval_library": "added_IVF692_Flat_nprobe_1_muyuv2_v2.index",
128
- "author": "Sxndypz"
129
- },
130
- "Eimi": {
131
- "enable": true,
132
- "model_path": "Eimi_Sxndypz.pth",
133
- "title": "Eimi Isami",
134
- "cover": "cover.png",
135
- "feature_retrieval_library": "added_IVF725_Flat_nprobe_1_eimi_v2.index",
136
- "author": "Sxndypz"
137
- },
138
- "Memory": {
139
- "enable": true,
140
- "model_path": "Memory_Sxndypz.pth",
141
- "title": "Kokoromo Memory",
142
- "cover": "cover.png",
143
- "feature_retrieval_library": "added_IVF930_Flat_nprobe_1_memory_v2_mbkm.index",
144
- "author": "Sxndypz"
145
- },
146
- "Clara": {
147
- "enable": true,
148
- "model_path": "Clara_Sxndypz.pth",
149
- "title": "Kaminari Clara",
150
- "cover": "cover.png",
151
- "feature_retrieval_library": "added_IVF1080_Flat_nprobe_1_clara_v2_mbkm.index",
152
- "author": "Sxndypz"
153
- }
 
 
 
 
 
 
 
 
154
  }
 
1
+ {
2
+ "Pippa": {
3
+ "enable": true,
4
+ "model_path": "Pippa_Pianissimo.pth",
5
+ "title": "Pipkin Pippa",
6
+ "cover": "cover.png",
7
+ "feature_retrieval_library": "added_IVF2367_Flat_nprobe_1_pippa-clean1_v2_mbkm.index",
8
+ "author": "Pianissimo"
9
+ },
10
+ "Tenma": {
11
+ "enable": true,
12
+ "model_path": "Tenma_MahdeenSky.pth",
13
+ "title": "Maemi Tenma",
14
+ "cover": "cover.png",
15
+ "feature_retrieval_library": "added_IVF733_Flat_nprobe_1_MaemiTenma_v2.index",
16
+ "author": "MahdeenSky"
17
+ },
18
+ "Lia": {
19
+ "enable": true,
20
+ "model_path": "Lia_KitLemonfoot.pth",
21
+ "title": "Rinkou Ashelia",
22
+ "cover": "cover.png",
23
+ "feature_retrieval_library": "added_IVF256_Flat_nprobe_1_RinkouAshelia_Speaking_KitLemonfoot_v2.index",
24
+ "author": "Kit Lemonfoot / NSHFB"
25
+ },
26
+ "Nasa": {
27
+ "enable": true,
28
+ "model_path": "Nasa_Sxndypz.pth",
29
+ "title": "Utatane Nasa",
30
+ "cover": "cover.png",
31
+ "feature_retrieval_library": "added_IVF978_Flat_nprobe_1_nasa_v2_mbkm.index",
32
+ "author": "Sxndypz"
33
+ },
34
+ "Uruka": {
35
+ "enable": true,
36
+ "model_path": "Uruka_RavenCutie21.pth",
37
+ "title": "Fujikura Uruka",
38
+ "cover": "cover.png",
39
+ "feature_retrieval_library": "added_IVF1156_Flat_nprobe_1_Uruka_v2.index",
40
+ "author": "RavenCutie21"
41
+ },
42
+ "Dizzy": {
43
+ "enable": true,
44
+ "model_path": "Dizzy_Sxndypz.pth",
45
+ "title": "Dizzy Dokuro",
46
+ "cover": "cover.png",
47
+ "feature_retrieval_library": "added_IVF1049_Flat_nprobe_1_dizzydokuro_v2_mbkm.index",
48
+ "author": "Sxndypz"
49
+ },
50
+ "Jelly": {
51
+ "enable": true,
52
+ "model_path": "Jelly_Sxndypz.pth",
53
+ "title": "Jelly Hoshiumi",
54
+ "cover": "cover.png",
55
+ "feature_retrieval_library": "added_IVF1304_Flat_nprobe_1_jellyhoshiumi_v2_mbkm.index",
56
+ "author": "Sxndypz"
57
+ },
58
+ "Ember": {
59
+ "enable": true,
60
+ "model_path": "Ember_RavenCutie21.pth",
61
+ "title": "Ember Amane",
62
+ "cover": "cover.png",
63
+ "feature_retrieval_library": "added_IVF1134_Flat_nprobe_1_Ember_v2.index",
64
+ "author": "RavenCutie21"
65
+ },
66
+ "Remilia": {
67
+ "enable": true,
68
+ "model_path": "Remilia_Sxndypz.pth",
69
+ "title": "Remilia Nephys",
70
+ "cover": "cover.png",
71
+ "feature_retrieval_library": "added_IVF1080_Flat_nprobe_1_remiliav2_v2_mbkm.index",
72
+ "author": "Sxndypz"
73
+ },
74
+ "Airi": {
75
+ "enable": true,
76
+ "model_path": "Airi_HinaBl.pth",
77
+ "title": "Chisaka Airi",
78
+ "cover": "cover.png",
79
+ "feature_retrieval_library": "added_IVF256_Flat_nprobe_1_chisaka-airi_v2.index",
80
+ "author": "HinaBl"
81
+ },
82
+ "Shiina": {
83
+ "enable": true,
84
+ "model_path": "Shiina_Sxndypz.pth",
85
+ "title": "Amanogawa Shiina",
86
+ "cover": "cover.png",
87
+ "feature_retrieval_library": "added_IVF1069_Flat_nprobe_1_shiina_32k_v2_mbkm.index",
88
+ "author": "Sxndypz"
89
+ },
90
+ "Rie": {
91
+ "enable": true,
92
+ "model_path": "Rie_Sxndypz.pth",
93
+ "title": "Himemiya Rie",
94
+ "cover": "cover.png",
95
+ "feature_retrieval_library": "added_IVF768_Flat_nprobe_1_himemiya_rie_v2.index",
96
+ "author": "Sxndypz"
97
+ },
98
+ "Erina": {
99
+ "enable": true,
100
+ "model_path": "Erina_RavenCutie21.pth",
101
+ "title": "Erina Makina",
102
+ "cover": "cover.png",
103
+ "feature_retrieval_library": "added_IVF931_Flat_nprobe_1_Erina_v2.index",
104
+ "author": "RavenCutie21"
105
+ },
106
+ "Panko": {
107
+ "enable": true,
108
+ "model_path": "Panko_Sxndypz.pth",
109
+ "title": "Komachi Panko",
110
+ "cover": "cover.png",
111
+ "feature_retrieval_library": "added_IVF764_Flat_nprobe_1_komachipanko_v2.index",
112
+ "author": "Sxndypz"
113
+ },
114
+ "Saya": {
115
+ "enable": true,
116
+ "model_path": "Saya_Sxndypz.pth",
117
+ "title": "Saya Sairroxs",
118
+ "cover": "cover.png",
119
+ "feature_retrieval_library": "added_IVF1271_Flat_nprobe_1_saya_v2_mbkm.index",
120
+ "author": "Sxndypz"
121
+ },
122
+ "Runie": {
123
+ "enable": true,
124
+ "model_path": "Runie_Sxndypz.pth",
125
+ "title": "Runie Ruse",
126
+ "cover": "cover.png",
127
+ "feature_retrieval_library": "added_IVF1386_Flat_nprobe_1_runie_v2_mbkm.index",
128
+ "author": "Sxndypz"
129
+ },
130
+ "Muyu": {
131
+ "enable": true,
132
+ "model_path": "Muyu_Sxndypz.pth",
133
+ "title": "Muu Muyu",
134
+ "cover": "cover.png",
135
+ "feature_retrieval_library": "added_IVF692_Flat_nprobe_1_muyuv2_v2.index",
136
+ "author": "Sxndypz"
137
+ },
138
+ "Eimi": {
139
+ "enable": true,
140
+ "model_path": "Eimi_Sxndypz.pth",
141
+ "title": "Eimi Isami",
142
+ "cover": "cover.png",
143
+ "feature_retrieval_library": "added_IVF725_Flat_nprobe_1_eimi_v2.index",
144
+ "author": "Sxndypz"
145
+ },
146
+ "Memory": {
147
+ "enable": true,
148
+ "model_path": "Memory_Sxndypz.pth",
149
+ "title": "Kokoromo Memory",
150
+ "cover": "cover.png",
151
+ "feature_retrieval_library": "added_IVF930_Flat_nprobe_1_memory_v2_mbkm.index",
152
+ "author": "Sxndypz"
153
+ },
154
+ "Clara": {
155
+ "enable": true,
156
+ "model_path": "Clara_Sxndypz.pth",
157
+ "title": "Kaminari Clara",
158
+ "cover": "cover.png",
159
+ "feature_retrieval_library": "added_IVF1080_Flat_nprobe_1_clara_v2_mbkm.index",
160
+ "author": "Sxndypz"
161
+ }
162
  }