Pipe1213 commited on
Commit
0893c84
·
verified ·
1 Parent(s): 1305dda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -8
app.py CHANGED
@@ -39,18 +39,17 @@ def load_model(model_path, hps):
39
  #hps = utils.get_hparams_from_file("configs/vctk_base.json")
40
  hps = utils.get_hparams_from_file("wa_graphemes/config.json")
41
 
42
- # Define a dictionary to store the model paths for each tab
43
  model_paths = {
44
  "Graphemes": "wa_graphemes/G_258000.pth"
45
  }
46
 
47
- # Load the initial model
48
  net_g = load_model(model_paths["Graphemes"], hps)
49
 
50
  def tts(text, speaker_id, tab_name):
51
  global net_g
52
  net_g = load_model(model_paths[tab_name], hps)
53
- sid = torch.LongTensor([speaker_id]) # speaker identity
54
  stn_tst = get_text(text, hps)
55
 
56
  with torch.no_grad():
@@ -77,6 +76,13 @@ with app:
77
  # First Text to Speech (TTS) for Walloon
78
  Based on VITS (https://github.com/jaywalnut310/vits).
79
  Write the text in graphemes. For faster inference speed it is recommended to use short sentences.
 
 
 
 
 
 
 
80
  """
81
  )
82
  with gr.Tabs():
@@ -84,11 +90,13 @@ with app:
84
 
85
  gr.Markdown(
86
  """
87
- ### Examples
88
- | Input Text | Speaker | Input Method |
89
- |------------|---------|---------------|
90
- | li biːç ɛ l sɔlja ɛstẽ ki s maʁɡajẽ sawɛ kiː ski , døː , ɛstøː l py fwaʁ . m ɛ̃ s koː la , la k i vɛjɛ õ tsminɔː k aʁivef pjim pjam , d ɛ̃ õ bja nuː tsoː paltɔ . | Female | Phonemes |
91
- | Li bijhe et l’ solea estént ki s’ margayént po sawè kî çki, des deus, esteut l’ pus foirt. Mins ç’ côp la, la k’ i veyèt on tchminåd k' arivéve pyim piam, dins on bea noû tchôd paltot. | Male | Graphemes |
 
 
92
  """
93
  )
94
 
 
39
  #hps = utils.get_hparams_from_file("configs/vctk_base.json")
40
  hps = utils.get_hparams_from_file("wa_graphemes/config.json")
41
 
 
42
  model_paths = {
43
  "Graphemes": "wa_graphemes/G_258000.pth"
44
  }
45
 
46
+ # Load the model
47
  net_g = load_model(model_paths["Graphemes"], hps)
48
 
49
  def tts(text, speaker_id, tab_name):
50
  global net_g
51
  net_g = load_model(model_paths[tab_name], hps)
52
+ sid = torch.LongTensor([speaker_id]) # speaker ID
53
  stn_tst = get_text(text, hps)
54
 
55
  with torch.no_grad():
 
76
  # First Text to Speech (TTS) for Walloon
77
  Based on VITS (https://github.com/jaywalnut310/vits).
78
  Write the text in graphemes. For faster inference speed it is recommended to use short sentences.
79
+
80
+ The quality of the results varies between male and female voice due to the limited data.
81
+ For better results with female voice use the phonemes based model.
82
+
83
+ https://huggingface.co/spaces/Pipe1213/VITS_Walloon_Phonemes
84
+
85
+ Hint: Some sample texts are available at the bottom of the web site.
86
  """
87
  )
88
  with gr.Tabs():
 
90
 
91
  gr.Markdown(
92
  """
93
+ ## Examples
94
+ | Input Text | Speaker |
95
+ |------------|---------|
96
+ | Portant, c' est l' seu ki n' doereut nén rire di lu, a mi idêye. | Female |
97
+ | Li bijhe et l’ solea estént ki s’ margayént po sawè kî çki, des deus, esteut l’ pus foirt. Mins ç’ côp la, la k’ i veyèt on tchminåd k' arivéve pyim piam, dins on bea noû tchôd paltot. | Male |
98
+ | Ci fourit co l' bedot les cåzes ca, a on moumint, li Ptit Prince mi dmanda yåk, come onk k' est so dotance, tot d' on côp | Female |
99
+ | Li Ptit Prince, da Antoenne di Sint-Spuri, ratourné e walon pa Lorint Enchel | Female |
100
  """
101
  )
102