Spaces:
Build error
Build error
Commit
•
d98fd17
1
Parent(s):
8d391eb
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ MODEL_NAME= "tts_models/multilingual/multi-dataset/your_tts"
|
|
114 |
|
115 |
|
116 |
|
117 |
-
def greet(character,your_voice,
|
118 |
|
119 |
#gradios set_state/get_state had problems on embedded html!
|
120 |
history = history or {"character": character, "message_history" : [] }
|
@@ -127,9 +127,6 @@ def greet(character,your_voice,other_voice,message,history):
|
|
127 |
|
128 |
|
129 |
response = get_chat_response(character,history=history["message_history"],input_txt=message)
|
130 |
-
|
131 |
-
if other_voice is not None:
|
132 |
-
your_voice = other_voice
|
133 |
|
134 |
os.system('tts --text "'+response+'" --model_name tts_models/multilingual/multi-dataset/your_tts --speaker_wav '+your_voice+' --language_idx "en"')
|
135 |
|
@@ -172,7 +169,7 @@ examples=[['Gandalf','Hello','dragon.wav']]
|
|
172 |
|
173 |
history = {"character": "None", "message_history" : [] }
|
174 |
interface= gr.Interface(fn=greet,
|
175 |
-
inputs=[gr.inputs.Dropdown(personality_choices),gr.inputs.Audio(source="microphone", type="filepath") ,
|
176 |
outputs=[gr.outputs.Audio(type="file"),"html","state"],
|
177 |
css=css, title=title, description=description,article=article )
|
178 |
|
|
|
114 |
|
115 |
|
116 |
|
117 |
+
def greet(character,your_voice,message,history):
|
118 |
|
119 |
#gradios set_state/get_state had problems on embedded html!
|
120 |
history = history or {"character": character, "message_history" : [] }
|
|
|
127 |
|
128 |
|
129 |
response = get_chat_response(character,history=history["message_history"],input_txt=message)
|
|
|
|
|
|
|
130 |
|
131 |
os.system('tts --text "'+response+'" --model_name tts_models/multilingual/multi-dataset/your_tts --speaker_wav '+your_voice+' --language_idx "en"')
|
132 |
|
|
|
169 |
|
170 |
history = {"character": "None", "message_history" : [] }
|
171 |
interface= gr.Interface(fn=greet,
|
172 |
+
inputs=[gr.inputs.Dropdown(personality_choices),gr.inputs.Audio(source="microphone", type="filepath") ,"text", "state"],
|
173 |
outputs=[gr.outputs.Audio(type="file"),"html","state"],
|
174 |
css=css, title=title, description=description,article=article )
|
175 |
|