Update TextGen/router.py
Browse files- TextGen/router.py +5 -4
TextGen/router.py
CHANGED
@@ -35,8 +35,9 @@ tts_client = Client("https://jofthomas-xtts.hf.space/",hf_token=my_hf_token)
|
|
35 |
|
36 |
|
37 |
main_npcs={
|
38 |
-
"Blacksmith":"./voices/
|
39 |
-
"Herbalist":"./voices/female.
|
|
|
40 |
}
|
41 |
class Generate(BaseModel):
|
42 |
text:str
|
@@ -87,9 +88,9 @@ def determine_vocie_from_npc(npc,genre):
|
|
87 |
return main_npcs[npc]
|
88 |
else:
|
89 |
if genre =="Male":
|
90 |
-
"./voices/
|
91 |
if genre=="Female":
|
92 |
-
return"./voices/
|
93 |
else:
|
94 |
return "./voices/narator_out.wav"
|
95 |
|
|
|
35 |
|
36 |
|
37 |
main_npcs={
|
38 |
+
"Blacksmith":"./voices/Blacksmith.mp3",
|
39 |
+
"Herbalist":"./voices/female.mp3"
|
40 |
+
"Bard":"./voices/Bard_voice.mp3"
|
41 |
}
|
42 |
class Generate(BaseModel):
|
43 |
text:str
|
|
|
88 |
return main_npcs[npc]
|
89 |
else:
|
90 |
if genre =="Male":
|
91 |
+
"./voices/default_male.mp3"
|
92 |
if genre=="Female":
|
93 |
+
return"./voices/default_female.mp3"
|
94 |
else:
|
95 |
return "./voices/narator_out.wav"
|
96 |
|