From a962d544abc0d4ec74234734676d7e3c1096d84b Mon Sep 17 00:00:00 2001 From: nl <3210346136@qq.com> Date: Sat, 28 Jul 2018 17:15:29 +0800 Subject: [PATCH] add a client for test --- testClient.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 testClient.py diff --git a/testClient.py b/testClient.py new file mode 100644 index 0000000..3102cb9 --- /dev/null +++ b/testClient.py @@ -0,0 +1,29 @@ +#!/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('E:\\语音数据集\\ST-CMDS-20170001_1-OS\\20170001P00241I0052.wav') +wavsignal,fs=read_wav_data('C:\\Users\\nl\\Desktop\\20180506_114631.wav') +#wavsignal,fs=read_wav_data('E:\\国创项目工程\\代码\\语音识别笔记本UWP\\语音识别笔记本UWP\\bin\\x86\\Debug\\AppX\\12345.wav') + +#print(wavsignal,fs) + +datas={'token':token, 'fs':fs, 'wavs':wavsignal} + +r = requests.post(url, datas) + +r.encoding='utf-8' + +print(r.text) \ No newline at end of file