hrdtbs commited on
Commit
94ac09c
·
1 Parent(s): 532d4d8

chore: follow linter

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. config.py +1 -1
app.py CHANGED
@@ -66,7 +66,7 @@ def create_vc_fn(tgt_sr, net_g, vc, if_f0, file_index):
66
  f"[{datetime.now().strftime('%Y-%m-%d %H:%M')}]: npy: {times[0]}, f0: {times[1]}s, infer: {times[2]}s"
67
  )
68
  return (tgt_sr, audio_opt)
69
- except:
70
  info = traceback.format_exc()
71
  print(info)
72
  return info, (None, None)
@@ -97,7 +97,7 @@ if __name__ == '__main__':
97
  tts_voice_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices())
98
  voices = [f"{v['ShortName']}-{v['Gender']}" for v in tts_voice_list]
99
  models = []
100
- with open(f"weights/model_info.json", "r", encoding="utf-8") as f:
101
  models_info = json.load(f)
102
  for model_name, info in models_info.items():
103
  if not info['enable']:
 
66
  f"[{datetime.now().strftime('%Y-%m-%d %H:%M')}]: npy: {times[0]}, f0: {times[1]}s, infer: {times[2]}s"
67
  )
68
  return (tgt_sr, audio_opt)
69
+ except BaseException:
70
  info = traceback.format_exc()
71
  print(info)
72
  return info, (None, None)
 
97
  tts_voice_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices())
98
  voices = [f"{v['ShortName']}-{v['Gender']}" for v in tts_voice_list]
99
  models = []
100
+ with open("weights/model_info.json", "r", encoding="utf-8") as f:
101
  models_info = json.load(f)
102
  for model_name, info in models_info.items():
103
  if not info['enable']:
config.py CHANGED
@@ -111,7 +111,7 @@ class Config:
111
  x_center = 38
112
  x_max = 41
113
 
114
- if self.gpu_mem != None and self.gpu_mem <= 4:
115
  x_pad = 1
116
  x_query = 5
117
  x_center = 30
 
111
  x_center = 38
112
  x_max = 41
113
 
114
+ if self.gpu_mem is not None and self.gpu_mem <= 4:
115
  x_pad = 1
116
  x_query = 5
117
  x_center = 30