update: 更新了默认的配置参数
update: 更新了测试代码中的默认ip与端口
This commit is contained in:
1 parent
ff88b94778
commit
0df6ecf394
5 files changed
+8
-9
No files matched your search
@@ -2,7 +2,7 @@ import requests
|
||||
import json
|
||||
|
||||
class CharacterServiceTest:
|
||||
def __init__(self,socket="http://114.214.236.207:7878"):
|
||||
def __init__(self,socket="http://127.0.0.1:8001"):
|
||||
self.socket = socket
|
||||
|
||||
def test_character_create(self):
|
||||
|
||||
@@ -10,7 +10,7 @@ import websockets
|
||||
|
||||
|
||||
class ChatServiceTest:
|
||||
def __init__(self,socket="http://114.214.236.207:7878"):
|
||||
def __init__(self,socket="http://127.0.0.1:8001"):
|
||||
self.socket = socket
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ class ChatServiceTest:
|
||||
await websocket.send(message)
|
||||
|
||||
|
||||
async with websockets.connect(f'ws://114.214.236.207:7878/chat/streaming/temporary') as websocket:
|
||||
async with websockets.connect(f'ws://127.0.0.1:8001/chat/streaming/temporary') as websocket:
|
||||
chunks = read_wav_file_in_chunks(2048) # 读取PCM文件并生成数据块
|
||||
for chunk in chunks:
|
||||
await send_audio_chunk(websocket, chunk)
|
||||
@@ -205,7 +205,7 @@ class ChatServiceTest:
|
||||
message = json.dumps(data)
|
||||
await websocket.send(message)
|
||||
|
||||
async with websockets.connect(f'ws://114.214.236.207:7878/chat/streaming/lasting') as websocket:
|
||||
async with websockets.connect(f'ws://127.0.0.1:8001/chat/streaming/lasting') as websocket:
|
||||
#发送第一次
|
||||
chunks = read_wav_file_in_chunks(2048)
|
||||
for chunk in chunks:
|
||||
@@ -255,7 +255,7 @@ class ChatServiceTest:
|
||||
current_dir = os.path.dirname(current_file_path)
|
||||
tests_dir = os.path.dirname(current_dir)
|
||||
file_path = os.path.join(tests_dir, 'assets', 'voice_call.wav')
|
||||
url = f"ws://114.214.236.207:7878/chat/voice_call"
|
||||
url = f"ws://127.0.0.1:8001/chat/voice_call"
|
||||
#发送格式
|
||||
ws_data = {
|
||||
"audio" : "",
|
||||
|
||||
@@ -4,7 +4,7 @@ import uuid
|
||||
|
||||
|
||||
class UserServiceTest:
|
||||
def __init__(self,socket="http://114.214.236.207:7878"):
|
||||
def __init__(self,socket="http://127.0.0.1:8001"):
|
||||
self.socket = socket
|
||||
|
||||
def test_user_create(self):
|
||||
|
||||
Reference in new issue
Block a user