Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ default_lang = "en"
|
|
7 |
#import whisper
|
8 |
#whisper_model = whisper.load_model("small")
|
9 |
whisper = gr.Interface.load(name="spaces/sanchit-gandhi/whisper-large-v2")
|
10 |
-
cn_a_jp = gr.Blocks.load(name="spaces/Yusin/anime-tts_yusin")
|
11 |
#chatgpt = gr.Blocks.load(name="spaces/fffiloni/whisper-to-chatGPT")
|
12 |
#chatgpt = gr.Blocks.load(name="spaces/seawolf2357/chatgptclone")
|
13 |
import os
|
@@ -41,14 +41,10 @@ def chat_hf(audio, custom_token, language):
|
|
41 |
gpt_response = """Sorry, I'm quite busy right now, but please try again later :)"""
|
42 |
|
43 |
# to voice
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
49 |
-
coquiTTS.get_tts(gpt_response, fp, speaker = {"language" : language})
|
50 |
-
voice_out = fp.name
|
51 |
-
return whisper_text, gpt_response, voice_out
|
52 |
|
53 |
# whisper
|
54 |
#def translate(audio):
|
|
|
7 |
#import whisper
|
8 |
#whisper_model = whisper.load_model("small")
|
9 |
whisper = gr.Interface.load(name="spaces/sanchit-gandhi/whisper-large-v2")
|
10 |
+
#cn_a_jp = gr.Blocks.load(name="spaces/Yusin/anime-tts_yusin")
|
11 |
#chatgpt = gr.Blocks.load(name="spaces/fffiloni/whisper-to-chatGPT")
|
12 |
#chatgpt = gr.Blocks.load(name="spaces/seawolf2357/chatgptclone")
|
13 |
import os
|
|
|
41 |
gpt_response = """Sorry, I'm quite busy right now, but please try again later :)"""
|
42 |
|
43 |
# to voice
|
44 |
+
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
45 |
+
coquiTTS.get_tts(gpt_response, fp, speaker = {"language" : language})
|
46 |
+
|
47 |
+
return whisper_text, gpt_response, fp.name
|
|
|
|
|
|
|
|
|
48 |
|
49 |
# whisper
|
50 |
#def translate(audio):
|