From fa460ce10131adb347aa8d44a3fad38eb665548c Mon Sep 17 00:00:00 2001 From: lipku Date: Fri, 5 Apr 2024 20:59:55 +0800 Subject: [PATCH] fix default config --- app.py | 6 +++--- echo.html | 2 +- llm/GPT.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index c039db1..f074278 100644 --- a/app.py +++ b/app.py @@ -99,7 +99,7 @@ def txt_to_audio(text_): text_, gspeaker, "zh-cn", #en args.language, - "http://192.168.1.3:9000", #args.server_url, + "http://localhost:9000", #args.server_url, "20" #args.stream_chunk_size ), nerfreal @@ -253,9 +253,9 @@ if __name__ == '__main__': parser.add_argument('--asr_play', action='store_true', help="play out the audio") #parser.add_argument('--asr_model', type=str, default='deepspeech') - # parser.add_argument('--asr_model', type=str, default='cpierse/wav2vec2-large-xlsr-53-esperanto') # + parser.add_argument('--asr_model', type=str, default='cpierse/wav2vec2-large-xlsr-53-esperanto') # # parser.add_argument('--asr_model', type=str, default='facebook/wav2vec2-large-960h-lv60-self') - parser.add_argument('--asr_model', type=str, default='facebook/hubert-large-ls960-ft') + # parser.add_argument('--asr_model', type=str, default='facebook/hubert-large-ls960-ft') parser.add_argument('--push_url', type=str, default='rtmp://localhost/live/livestream') diff --git a/echo.html b/echo.html index bb117f8..f687c4e 100644 --- a/echo.html +++ b/echo.html @@ -29,7 +29,7 @@ $(document).ready(function() { var host = window.location.hostname - var ws = new WebSocket("ws://"+host+":8000/humanchat"); + var ws = new WebSocket("ws://"+host+":8000/humanecho"); //document.getElementsByTagName("video")[0].setAttribute("src", aa["video"]); ws.onopen = function() { console.log('Connected'); diff --git a/llm/GPT.py b/llm/GPT.py index 5bdb0a7..fb35168 100644 --- a/llm/GPT.py +++ b/llm/GPT.py @@ -18,5 +18,5 @@ class GPT(): return response['choices'][0]['message']['content'] if __name__ == '__main__': - llm = GPT('gpt-3.5-turbo', 'sk-RlcPif13aQqPOU5udfkG2z0gtxD0HS','https://openai.api2d.net/v1') + llm = GPT('gpt-3.5-turbo', '你的API Key','https://openai.api2d.net/v1') response = llm.chat("如何应对压力?") \ No newline at end of file