1 Star 0 Fork 125

李锋涛 / ASRT_SpeechRecognition

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
testClient.py 520 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
@author: nl8590687
asrserver测试专用客户端
'''
import requests
from general_function.file_wav import *
url = 'http://127.0.0.1:20000/'
token = 'qwertasd'
wavsignal,fs=read_wav_data('D:\\语音数据集\\ST-CMDS-20170001_1-OS\\20170001P00241I0052.wav')
#print(wavsignal,fs)
datas={'token':token, 'fs':fs, 'wavs':wavsignal}
import time
t0=time.time()
r = requests.post(url, datas)
t1=time.time()
r.encoding='utf-8'
print(r.text)
print('time:', t1-t0, 's')
Python
1
https://gitee.com/jssoso_admin/ASRT_SpeechRecognition.git
git@gitee.com:jssoso_admin/ASRT_SpeechRecognition.git
jssoso_admin
ASRT_SpeechRecognition
ASRT_SpeechRecognition
master

搜索帮助