Lagyamfi commited on
Commit
cf4d0f4
·
verified ·
1 Parent(s): 5d6668e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -4,7 +4,7 @@ from gradio_client import Client
4
 
5
  MY_HF_TOKEN_KEY = os.environ["MY_HF_TOKEN_KEY"]
6
 
7
- client = Client("Ghana-NLP/kikuyu-tts",hf_token=MY_HF_TOKEN_KEY)
8
 
9
  def generate(text, speaker):
10
  output = client.predict(text, speaker)
@@ -13,13 +13,13 @@ def generate(text, speaker):
13
  title = "GhanaNLP: Speech Synthesis"
14
 
15
  description = """
16
- <b>How to use:</b> Enter some Kikuyu text and choose a speaker.
17
  """
18
 
19
  examples = [
20
- ["Nao makĩguthũkĩra indo iria maatahĩte, makĩoya ngʼondu, na ngʼombe, na tũcaũ, magĩcithĩnjĩra hau thĩ, na magĩcirĩanĩria na thakame.", "ki_1"],
21
- ["Hĩndĩ ĩyo Abimeleku agĩthiĩ kũrĩ Isaaka oimĩte Gerari, marĩ na Ahuzathu ũrĩa wamũtaaraga, na Fikolu mũnene wa ita ciake.", "ki_2"],
22
- ["Wee nĩũũĩ ũrĩa matu macio macuurĩtio wega, magegania macio ma ũrĩa ũrĩ ũmenyo mũkinyanĩru?", "ki_3"],
23
  ]
24
 
25
  gr.Interface(
@@ -27,11 +27,11 @@ gr.Interface(
27
  inputs=[
28
  gr.Text(label="Input Text"),
29
  gr.Radio(label="Speaker", choices=[
30
- "ki_1",
31
- "ki_2",
32
- "ki_3",
33
  ],
34
- value="ki_1"),
35
  ],
36
  outputs=[
37
  gr.Audio(label="Generated Speech", type="filepath"),
 
4
 
5
  MY_HF_TOKEN_KEY = os.environ["MY_HF_TOKEN_KEY"]
6
 
7
+ client = Client("Ghana-NLP/ewe-tts",hf_token=MY_HF_TOKEN_KEY)
8
 
9
  def generate(text, speaker):
10
  output = client.predict(text, speaker)
 
13
  title = "GhanaNLP: Speech Synthesis"
14
 
15
  description = """
16
+ <b>How to use:</b> Enter some Ewe text and choose a speaker.
17
  """
18
 
19
  examples = [
20
+ ["Gbe ma gbe fiẽ la, wowu alẽ, nyi kple nyivi siwo woha le aʋa la me eye woɖu woƒe lã kple ʋua katã nenema.", "ee_1"],
21
+ ["Tete mese gbe aɖe tso fiazikpui la gbɔ le gbɔgblɔm be, “Kpɔ ɖa, Mawu ƒe nɔƒe le amegbetɔwo dome azɔ, eye wòanɔ wo gbɔ. Woanye eƒe dukɔ, Mawu ŋutɔ anɔ wo gbɔ, eye wòanye woƒe Mawu.", "ee_2"],
22
+ ["Eƒe ɣedzeƒeliƒo ƒe afã le dzigbeme gome tso Tapua, to Kana tɔʋu la ŋu yi ɖatɔ Domeƒu la. Esia nye Efraimviwo ƒe to la ƒe anyigba le woƒe ƒomeawo nu.", "ee_3"],
23
  ]
24
 
25
  gr.Interface(
 
27
  inputs=[
28
  gr.Text(label="Input Text"),
29
  gr.Radio(label="Speaker", choices=[
30
+ "ee_1",
31
+ "ee_2",
32
+ "ee_3",
33
  ],
34
+ value="ee_1"),
35
  ],
36
  outputs=[
37
  gr.Audio(label="Generated Speech", type="filepath"),