eswardivi commited on
Commit
1821dd9
1 Parent(s): a4ac244
Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +4 -3
README.md CHANGED
@@ -1,11 +1,11 @@
1
  ---
2
- title: MeloTTS
3
  colorFrom: blue
4
  colorTo: blue
5
  sdk: gradio
6
  emoji: 🗣️
7
  license: mit
8
  app_file: app.py
9
- pinned: false
10
  short_description: Fast, efficient, & multilingual text-to-speech
11
  ---
 
1
  ---
2
+ title: Podcastify
3
  colorFrom: blue
4
  colorTo: blue
5
  sdk: gradio
6
  emoji: 🗣️
7
  license: mit
8
  app_file: app.py
9
+ pinned: true
10
  short_description: Fast, efficient, & multilingual text-to-speech
11
  ---
app.py CHANGED
@@ -10,11 +10,12 @@ import tempfile
10
  def synthesize(text, speed, progress=gr.Progress()):
11
  speed = 1.0
12
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
13
- model= TTS(language='EN', device=device),
14
- speaker_ids = model.hps.data.spk2id
 
15
  speakers=['EN-US','EN-Default']
16
  bio = io.BytesIO()
17
- models[language].tts_to_file(text, model.hps.data.spk2id[speakers[0]], bio, speed=speed, pbar=progress.tqdm, format='wav')
18
  return bio.getvalue()
19
 
20
 
 
10
  def synthesize(text, speed, progress=gr.Progress()):
11
  speed = 1.0
12
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
13
+ models = {
14
+ 'EN': TTS(language='EN', device=device),
15
+ }
16
  speakers=['EN-US','EN-Default']
17
  bio = io.BytesIO()
18
+ models[language].tts_to_file(text, models['EN'].hps.data.spk2id[speakers[0]], bio, speed=speed, pbar=progress.tqdm, format='wav')
19
  return bio.getvalue()
20
 
21