style: 优化代码风格

This commit is contained in:
nl 2021-11-20 21:43:34 +08:00
parent 4ea736a747
commit 1a94ede098
1 changed files with 6 additions and 8 deletions

View File

@ -22,21 +22,19 @@
@author: nl8590687 @author: nl8590687
ASRT语音识别asrserver测试专用客户端 ASRT语音识别asrserver测试专用客户端
''' '''
import time
import requests import requests
from utils.ops import read_wav_data from utils.ops import read_wav_data
url = 'http://127.0.0.1:20000/' URL = 'http://127.0.0.1:20000/'
token = 'qwertasd' TOKEN = 'qwertasd'
wavsignal, fs, _, _ = read_wav_data('X:\\语音数据集\\data_thchs30\\train\\A11_0.wav') wavsignal, fs, _, _ = read_wav_data('X:\\语音数据集\\data_thchs30\\train\\A11_0.wav')
datas={'token':TOKEN, 'fs':fs, 'wavs':wavsignal}
datas={'token':token, 'fs':fs, 'wavs':wavsignal}
import time
t0=time.time() t0=time.time()
r = requests.post(url, datas) r = requests.post(URL, datas)
t1=time.time() t1=time.time()
r.encoding='utf-8' r.encoding='utf-8'
print(r.text) print(r.text)
print('time:', t1-t0, 's') print('time:', t1-t0, 's')