fix: json format (#84)

* Update extract_locale.py

* Apply Code Formatter Change

* Update locale_diff.py

* Apply Code Formatter Change

---------

Co-authored-by: fumiama <fumiama@users.noreply.github.com>
This commit is contained in:
源文雨 2023-04-17 20:49:29 +08:00 committed by GitHub
parent 5ab6713bb3
commit b0f8a4c7d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 5 deletions

View File

@ -28,3 +28,4 @@ process("gui.py")
# Save as a JSON file
with open("./i18n/zh_CN.json", "w", encoding="utf-8") as f:
json.dump(data, f, ensure_ascii=False, indent=4)
f.write("\n")

1
gui.py
View File

@ -1,4 +1,5 @@
import os, sys
now_dir = os.getcwd()
sys.path.append(now_dir)
import PySimpleGUI as sg

View File

@ -42,3 +42,4 @@ for lang_file in languages:
# Save the updated language file
with open(lang_file, "w", encoding="utf-8") as f:
json.dump(lang_data, f, ensure_ascii=False, indent=4)
f.write("\n")

View File

@ -139,8 +139,17 @@ def vc_single(
if hubert_model == None:
load_hubert()
if_f0 = cpt.get("f0", 1)
file_index = file_index.strip(" ").strip('"').strip("\n").strip('"').strip(" ").replace("trained","added")#防止小白写错,自动帮他替换掉
file_big_npy = file_big_npy.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
file_index = (
file_index.strip(" ")
.strip('"')
.strip("\n")
.strip('"')
.strip(" ")
.replace("trained", "added")
) # 防止小白写错,自动帮他替换掉
file_big_npy = (
file_big_npy.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
)
audio_opt = vc.pipeline(
hubert_model,
net_g,

View File

@ -39,7 +39,7 @@ class PreProcess:
max_sil_kept=150,
)
self.sr = sr
self.bh, self.ah = signal.butter(N=5, Wn=48, btype='high', fs=self.sr)
self.bh, self.ah = signal.butter(N=5, Wn=48, btype="high", fs=self.sr)
self.per = 3.7
self.overlap = 0.3
self.tail = self.per + self.overlap

View File

@ -5,7 +5,9 @@ from config import x_pad, x_query, x_center, x_max
import scipy.signal as signal
import pyworld, os, traceback, faiss
from scipy import signal
bh, ah = signal.butter(N=5, Wn=48, btype='high', fs=16000)
bh, ah = signal.butter(N=5, Wn=48, btype="high", fs=16000)
class VC(object):
def __init__(self, tgt_sr, device, is_half):