Kamtera commited on
Commit
e7dae75
·
1 Parent(s): 8d910b7

persian tts

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -3,9 +3,7 @@ import tempfile
3
  from typing import Optional
4
  from TTS.config import load_config
5
  import gradio as gr
6
- import numpy as np
7
- import os
8
- import json
9
  from TTS.utils.manage import ModelManager
10
  from TTS.utils.synthesizer import Synthesizer
11
 
@@ -31,7 +29,7 @@ def tts(text: str):
31
  # synthesize
32
  if synthesizer is None:
33
  raise NameError("model not found")
34
- wavs = synthesizer.tts(text, speaker_idx)
35
  # return output
36
  with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
37
  synthesizer.save_wav(wavs, fp)
@@ -39,8 +37,9 @@ def tts(text: str):
39
 
40
 
41
  description="""
42
- This is a demo of first public free persian text to speech model.
43
  Model trained on this dataset : https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale
 
44
  """
45
  article= ""
46
 
 
3
  from typing import Optional
4
  from TTS.config import load_config
5
  import gradio as gr
6
+
 
 
7
  from TTS.utils.manage import ModelManager
8
  from TTS.utils.synthesizer import Synthesizer
9
 
 
29
  # synthesize
30
  if synthesizer is None:
31
  raise NameError("model not found")
32
+ wavs = synthesizer.tts(text)
33
  # return output
34
  with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
35
  synthesizer.save_wav(wavs, fp)
 
37
 
38
 
39
  description="""
40
+ This is a demo of persian text to speech model.
41
  Model trained on this dataset : https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale
42
+
43
  """
44
  article= ""
45