RO-Rtechs commited on
Commit
c5f1c66
·
verified ·
1 Parent(s): 41fd93c

Update app_rvc.py

Browse files

gtts_updated for Amharic language (rtechs)

Files changed (1) hide show
  1. app_rvc.py +7 -1
app_rvc.py CHANGED
@@ -1,6 +1,8 @@
1
  import gradio as gr
2
  import os
3
- os.system("pip install -q piper-tts==1.2.0")
 
 
4
  os.system("pip install -q -r requirements_xtts.txt")
5
  os.system("pip install -q TTS==0.21.1 --no-deps")
6
  import spaces
@@ -129,6 +131,7 @@ class TTS_Info:
129
  self.list_bark = list(BARK_VOICES_LIST.keys())
130
  self.list_vits = list(VITS_VOICES_LIST.keys())
131
  self.list_openai_tts = OPENAI_TTS_MODELS
 
132
  self.piper_enabled = piper_enabled
133
  self.list_vits_onnx = (
134
  piper_tts_voices_list() if self.piper_enabled else []
@@ -145,6 +148,7 @@ class TTS_Info:
145
  + self.list_vits
146
  + self.list_openai_tts
147
  + self.list_vits_onnx
 
148
  )
149
  return list_tts
150
 
@@ -304,6 +308,7 @@ class SoniTranslate(SoniTrCache):
304
 
305
  def get_tts_voice_list(self):
306
  try:
 
307
  from piper import PiperVoice # noqa
308
 
309
  piper_enabled = True
@@ -313,6 +318,7 @@ class SoniTranslate(SoniTrCache):
313
  piper_enabled = False
314
  logger.info("PIPER TTS disabled")
315
  try:
 
316
  from TTS.api import TTS # noqa
317
 
318
  xtts_enabled = True
 
1
  import gradio as gr
2
  import os
3
+ os.system("pip install -q https://github.com/R3gm/piper-phonemize/releases/download/1.2.0/piper_phonemize-1.2.0-cp310-cp310-win_amd64.whl")
4
+ os.system("pip install -q sherpa-onnx==1.9.12")
5
+ os.system("pip install -q piper-tts==1.2.0 --no-deps")
6
  os.system("pip install -q -r requirements_xtts.txt")
7
  os.system("pip install -q TTS==0.21.1 --no-deps")
8
  import spaces
 
131
  self.list_bark = list(BARK_VOICES_LIST.keys())
132
  self.list_vits = list(VITS_VOICES_LIST.keys())
133
  self.list_openai_tts = OPENAI_TTS_MODELS
134
+ self.list_gtts = ["am-GTTS"] # Add Amharic gTTS
135
  self.piper_enabled = piper_enabled
136
  self.list_vits_onnx = (
137
  piper_tts_voices_list() if self.piper_enabled else []
 
148
  + self.list_vits
149
  + self.list_openai_tts
150
  + self.list_vits_onnx
151
+ + self.list_gtts # Add gTTS voices to the list
152
  )
153
  return list_tts
154
 
 
308
 
309
  def get_tts_voice_list(self):
310
  try:
311
+ os.system("pip install -q piper-tts")
312
  from piper import PiperVoice # noqa
313
 
314
  piper_enabled = True
 
318
  piper_enabled = False
319
  logger.info("PIPER TTS disabled")
320
  try:
321
+ os.system("pip install -q TTS")
322
  from TTS.api import TTS # noqa
323
 
324
  xtts_enabled = True