fix default config

This commit is contained in:
lipku 2024-04-05 20:59:55 +08:00
parent 313d57dfa4
commit fa460ce101
3 changed files with 5 additions and 5 deletions

6
app.py
View File

@ -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')

View File

@ -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');

View File

@ -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("如何应对压力?")