Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
d264d58
1
Parent(s):
0c388a7
enlarge s2u time
Browse files
app.py
CHANGED
@@ -51,11 +51,11 @@ asr_format = "Please recognize the text corresponding to the follwing speech.\n"
|
|
51 |
tts_format = "Please synthesize the speech corresponding to the follwing text.\n"
|
52 |
chat_format = r'Please recognize the texts, emotion and pitch from the user question speech units and provide the texts, emotion, pitch and speech units for the assistant response. \nEmotion should be chosen from ["neutral", "happy", "sad", "angry", "surprised", "disgusted", "fearful"]. \nPitch should be chosen from ["low", "normal", "high"].\nYour output should be in json format.\nAn output example is:\n{"user question text": "", "user question emotion": "", "user question pitch": "", "assistant response text": "", "assistant response emotion": "", "assistant response pitch": "","assistant response speech": ""}\n\nuser question speech:'
|
53 |
|
54 |
-
@spaces.GPU(duration=
|
55 |
def s2u_asr(text, audio_file):
|
56 |
return asr_format + s2u_extract_unit_demo(s2u_model, audio_file, model_name=s2u_model_name, reduced=reduced)
|
57 |
|
58 |
-
@spaces.GPU(duration=
|
59 |
def s2u_chat(text, audio_file):
|
60 |
return chat_format + s2u_extract_unit_demo(s2u_model, audio_file, model_name=s2u_model_name, reduced=reduced)
|
61 |
|
|
|
51 |
tts_format = "Please synthesize the speech corresponding to the follwing text.\n"
|
52 |
chat_format = r'Please recognize the texts, emotion and pitch from the user question speech units and provide the texts, emotion, pitch and speech units for the assistant response. \nEmotion should be chosen from ["neutral", "happy", "sad", "angry", "surprised", "disgusted", "fearful"]. \nPitch should be chosen from ["low", "normal", "high"].\nYour output should be in json format.\nAn output example is:\n{"user question text": "", "user question emotion": "", "user question pitch": "", "assistant response text": "", "assistant response emotion": "", "assistant response pitch": "","assistant response speech": ""}\n\nuser question speech:'
|
53 |
|
54 |
+
@spaces.GPU(duration=10)
|
55 |
def s2u_asr(text, audio_file):
|
56 |
return asr_format + s2u_extract_unit_demo(s2u_model, audio_file, model_name=s2u_model_name, reduced=reduced)
|
57 |
|
58 |
+
@spaces.GPU(duration=10)
|
59 |
def s2u_chat(text, audio_file):
|
60 |
return chat_format + s2u_extract_unit_demo(s2u_model, audio_file, model_name=s2u_model_name, reduced=reduced)
|
61 |
|