mrfakename commited on
Commit
0a511af
1 Parent(s): a520615
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,8 +10,9 @@ theme = gr.themes.Base(
10
  voicelist = ['f-us-1', 'f-us-2', 'f-us-3', 'f-us-4', 'm-us-1', 'm-us-2', 'm-us-3', 'm-us-4']
11
  voices = {}
12
  # todo: cache computed style, load using pickle
13
- if os.path.exists('voices.pkl', 'rb') as f:
14
- voices = pickle.load(f)
 
15
  else:
16
  for v in voicelist:
17
  voices[v] = styletts2importable.compute_style(f'voices/{v}.wav')
 
10
  voicelist = ['f-us-1', 'f-us-2', 'f-us-3', 'f-us-4', 'm-us-1', 'm-us-2', 'm-us-3', 'm-us-4']
11
  voices = {}
12
  # todo: cache computed style, load using pickle
13
+ if os.path.exists('voices.pkl'):
14
+ with open('voices.pkl', 'rb') as f:
15
+ voices = pickle.load(f)
16
  else:
17
  for v in voicelist:
18
  voices[v] = styletts2importable.compute_style(f'voices/{v}.wav')