mrfakename commited on
Commit
50a9d0f
1 Parent(s): e599595

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -7,7 +7,7 @@ theme = gr.themes.Base(
7
  )
8
  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']
9
  voices = {}
10
- # todo cache computed style
11
  for v in voicelist:
12
  voices[v] = styletts2importable.compute_style(f'voices/{v}.wav')
13
  def synthesize(text, voice):
@@ -72,7 +72,16 @@ Is there a long queue on this space? Duplicate it and add a more powerful GPU to
72
  **NOTE: StyleTTS 2 does better on longer texts.** For example, making it say "hi" will produce a lower-quality result than making it say a longer phrase.""")
73
  gr.DuplicateButton("Duplicate Space")
74
  gr.TabbedInterface([vctk, clone, lj], ['Multi-Voice', 'Voice Cloning', 'LJSpeech'])
75
- gr.Markdown("Demo by by [mrfakename](https://twitter.com/realmrfakename). I am not affiliated with the StyleTTS 2 authors.")
 
 
 
 
 
 
 
 
 
76
  if __name__ == "__main__":
77
  demo.queue(api_open=False, max_size=15).launch(show_api=False)
78
 
 
7
  )
8
  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']
9
  voices = {}
10
+ # todo: cache computed style, load using pickle
11
  for v in voicelist:
12
  voices[v] = styletts2importable.compute_style(f'voices/{v}.wav')
13
  def synthesize(text, voice):
 
72
  **NOTE: StyleTTS 2 does better on longer texts.** For example, making it say "hi" will produce a lower-quality result than making it say a longer phrase.""")
73
  gr.DuplicateButton("Duplicate Space")
74
  gr.TabbedInterface([vctk, clone, lj], ['Multi-Voice', 'Voice Cloning', 'LJSpeech'])
75
+ gr.Markdown("""
76
+ Demo by by [mrfakename](https://twitter.com/realmrfakename). I am not affiliated with the StyleTTS 2 authors.
77
+
78
+ Run this demo locally using Docker:
79
+
80
+ ```bash
81
+ docker run -it -p 7860:7860 --platform=linux/amd64 --gpus all \
82
+ registry.hf.space/styletts2-styletts2:latest python app.py
83
+ ```
84
+ """)
85
  if __name__ == "__main__":
86
  demo.queue(api_open=False, max_size=15).launch(show_api=False)
87