gorkemgoknar commited on
Commit
581624f
1 Parent(s): 2495c6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -19,6 +19,7 @@ from transformers import (
19
  #Coqui V1 api render voice, you can also use XTTS
20
  #COQUI_URL="https://app.coqui.ai/api/v2/samples"
21
  COQUI_URL="https://app.coqui.ai/api/v2/samples/multilingual/render/"
 
22
  ### Warning each sample will consume your credits
23
  COQUI_TOKEN=os.environ.get("COQUI_TOKEN")
24
 
@@ -93,6 +94,10 @@ def get_audio_url(text,character):
93
  supported_languages=["en","de","fr","es","it","pt","pl"]
94
  if text_language not in supported_languages:
95
  text_language="en"
 
 
 
 
96
 
97
  # voice id of "Baldur Sanjin" from buildin coqui.ai speakers
98
  # more via https://docs.coqui.ai/reference/speakers_retrieve
 
19
  #Coqui V1 api render voice, you can also use XTTS
20
  #COQUI_URL="https://app.coqui.ai/api/v2/samples"
21
  COQUI_URL="https://app.coqui.ai/api/v2/samples/multilingual/render/"
22
+ COQUI_URL_EN=="https://app.coqui.ai/api/v2/samples/xtts/render/"
23
  ### Warning each sample will consume your credits
24
  COQUI_TOKEN=os.environ.get("COQUI_TOKEN")
25
 
 
94
  supported_languages=["en","de","fr","es","it","pt","pl"]
95
  if text_language not in supported_languages:
96
  text_language="en"
97
+
98
+ if text_language=="en":
99
+ # use main English model for english, better on english only
100
+ url = COQUI_URL_EN
101
 
102
  # voice id of "Baldur Sanjin" from buildin coqui.ai speakers
103
  # more via https://docs.coqui.ai/reference/speakers_retrieve