huseinzol05 commited on
Commit
fb9559e
1 Parent(s): 82cb89c
Files changed (4) hide show
  1. .gitignore +2 -0
  2. README.md +1 -1
  3. app.py +5 -2
  4. requirements.txt +4 -6
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
1
+ flagged
2
+ __pycache__
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🦜
4
  colorFrom: pink
5
  colorTo: purple
6
  sdk: gradio
7
- sdk_version: 3.8.2
8
  app_file: app.py
9
  pinned: false
10
  ---
4
  colorFrom: pink
5
  colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 4.14.0
8
  app_file: app.py
9
  pinned: false
10
  ---
app.py CHANGED
@@ -12,9 +12,12 @@ import json
12
  logging.basicConfig(level=logging.INFO)
13
 
14
  MODELS = {}
15
- AVAILABLE_MODELS = malaya_speech.tts.available_vits().index.tolist()
 
16
 
17
  def tts(text, model, temperature, length_ratio):
 
 
18
  global MODELS
19
  if model not in MODELS:
20
  MODELS[model] = malaya_speech.tts.vits(model=model)
@@ -41,7 +44,7 @@ demo = gr.Interface(
41
  ['SHAH ALAM - Pertubuhan Kebajikan Anak Bersatu Selangor bersetuju pihak kerajaan mewujudkan Suruhanjaya Siasatan Diraja untuk menyiasat isu kartel daging.', 'mesolitica/VITS-haqkiem', 0.6666, 1.0],
42
  ],
43
  cache_examples=False,
44
- title='End-to-End TTS using VITS from Mesolitica',
45
  )
46
 
47
  demo.launch(server_name='0.0.0.0')
12
  logging.basicConfig(level=logging.INFO)
13
 
14
  MODELS = {}
15
+ AVAILABLE_MODELS = list(malaya_speech.tts.available_vits.keys())
16
+ AVAILABLE_MODELS = [m for m in AVAILABLE_MODELS if 'multispeaker' not in m and 'jordan' not in m]
17
 
18
  def tts(text, model, temperature, length_ratio):
19
+ if len(text) < 1:
20
+ raise gr.Error('input text must longer than 0')
21
  global MODELS
22
  if model not in MODELS:
23
  MODELS[model] = malaya_speech.tts.vits(model=model)
44
  ['SHAH ALAM - Pertubuhan Kebajikan Anak Bersatu Selangor bersetuju pihak kerajaan mewujudkan Suruhanjaya Siasatan Diraja untuk menyiasat isu kartel daging.', 'mesolitica/VITS-haqkiem', 0.6666, 1.0],
45
  ],
46
  cache_examples=False,
47
+ title='End-to-End Malaysian TTS using VITS',
48
  )
49
 
50
  demo.launch(server_name='0.0.0.0')
requirements.txt CHANGED
@@ -1,8 +1,6 @@
1
- malaya-speech
2
  malaya
3
- tensorflow==2.9.2
4
- torch==1.12.1
5
- malaya-boilerplate==0.0.23
6
  matplotlib
7
- transformers
8
- httpx==0.24.1
1
+ malaya-speech @ git+https://github.com/mesolitica/malaya-speech@e8bc60dc5a64cf0f7d12bd58dd5c686730e57989
2
  malaya
3
+ torch==2.0.1
4
+ malaya-boilerplate @ git+https://github.com/mesolitica/malaya-boilerplate
 
5
  matplotlib
6
+ transformers