R-Kentaren commited on
Commit
61eb9ae
Β·
verified Β·
1 Parent(s): 4b3eb16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -148,7 +148,6 @@ def tts(
148
  tts_text,
149
  tts_voice,
150
  f0_up_key,
151
- f0_method,
152
  index_rate,
153
  protect,
154
  filter_radius=3,
@@ -162,7 +161,7 @@ def tts(
162
  print(tts_text)
163
  print(f"Suara TTS: {tts_voice}, kecepatan: {speed}")
164
  print(f"Nama model: {model_name}")
165
- print(f"F0: {f0_method}, Key: {f0_up_key}, Index: {index_rate}, Protect: {protect}")
166
  try:
167
  # Batasan panjang teks jika ada batasan sistem
168
  if limitation and len(tts_text) > 500:
@@ -207,8 +206,7 @@ def tts(
207
 
208
  # Memuat model data
209
  tgt_sr, net_g, vc, version, index_file, if_f0 = model_data(model_name)
210
- if f0_method == "rmvpe":
211
- vc.model_rmvpe = rmvpe_model
212
  times = [0, 0, 0]
213
 
214
  # Menggunakan pipeline RVC untuk menghasilkan file suara akhir
@@ -220,7 +218,7 @@ def tts(
220
  edge_output_filename,
221
  times,
222
  f0_up_key,
223
- f0_method,
224
  index_file,
225
  index_rate,
226
  if_f0,
@@ -269,7 +267,9 @@ print("Model rmvpe dimuat.")
269
 
270
  # Initial markdown text untuk ditampilkan di antarmuka
271
  initial_md = """
272
- # TTS-RVC-Artis Indonesia
 
 
273
 
274
  Pembuktian algoritma **Retrieval-based Voice Conversion (RVC)** dan teknologi **Edge TTS** yang dapat membuat clone dari suara artis & selebriti di Indonesia.
275
 
@@ -292,12 +292,7 @@ with app:
292
  value=2,
293
  )
294
  with gr.Column():
295
- f0_method = gr.Radio(
296
- label="",
297
- choices=["rmvpe"],
298
- value="rmvpe",
299
- visible=False,
300
- )
301
  index_rate = gr.Slider(
302
  minimum=0,
303
  maximum=1,
@@ -346,7 +341,6 @@ with app:
346
  tts_text,
347
  tts_voice,
348
  f0_key_up,
349
- f0_method,
350
  index_rate,
351
  protect0,
352
  ],
 
148
  tts_text,
149
  tts_voice,
150
  f0_up_key,
 
151
  index_rate,
152
  protect,
153
  filter_radius=3,
 
161
  print(tts_text)
162
  print(f"Suara TTS: {tts_voice}, kecepatan: {speed}")
163
  print(f"Nama model: {model_name}")
164
+ print(f"Key: {f0_up_key}\n, Index: {index_rate}\n, Protect: {protect}")
165
  try:
166
  # Batasan panjang teks jika ada batasan sistem
167
  if limitation and len(tts_text) > 500:
 
206
 
207
  # Memuat model data
208
  tgt_sr, net_g, vc, version, index_file, if_f0 = model_data(model_name)
209
+ vc.model_rmvpe = rmvpe_model
 
210
  times = [0, 0, 0]
211
 
212
  # Menggunakan pipeline RVC untuk menghasilkan file suara akhir
 
218
  edge_output_filename,
219
  times,
220
  f0_up_key,
221
+ f0_method="rmvpe",
222
  index_file,
223
  index_rate,
224
  if_f0,
 
267
 
268
  # Initial markdown text untuk ditampilkan di antarmuka
269
  initial_md = """
270
+ <h1 align="center"><b> TTS RVC Indonesia 🎡 </b></h1>
271
+ </div>
272
+
273
 
274
  Pembuktian algoritma **Retrieval-based Voice Conversion (RVC)** dan teknologi **Edge TTS** yang dapat membuat clone dari suara artis & selebriti di Indonesia.
275
 
 
292
  value=2,
293
  )
294
  with gr.Column():
295
+
 
 
 
 
 
296
  index_rate = gr.Slider(
297
  minimum=0,
298
  maximum=1,
 
341
  tts_text,
342
  tts_voice,
343
  f0_key_up,
 
344
  index_rate,
345
  protect0,
346
  ],