标签:讯飞语音 反馈 访问 response 打开 port alt put json
https://github.com/1158114251/-Intelligent-speech-robot
https://www.kancloud.cn/turing/web_api/522992
图灵网站:https://www.kancloud.cn/turing/web_api/522992
apikey:820c4a6ca4694063ab6002be1d1c63d3
UTF-8(调用图灵API的各个环节的编码方式均为UTF-8)
http://openapi.tuling123.com/openapi/api/v2
HTTP POST
# -*- coding: utf-8 -*- import urllib import json def getHtml(url): page = urllib.urlopen(url) html = page.read() return html if __name__ == ‘__main__‘: key = ‘820c4a6ca4694063ab6002be1d1c63d3‘ api = ‘http://www.tuling123.com/openapi/api?key=‘ + key + ‘&info=‘ while True: info = raw_input(‘你好‘) request = api + info response = getHtml(request) dic_json = json.loads(response) print ‘机器人: ‘.decode(‘utf-8‘) + dic_json[‘text‘]
api = ‘http://www.tuling123.com/openapi/api?key=‘ + 密钥+ ‘&info=‘+语音内容
打开网页游览器 输入
http://www.tuling123.com/openapi/api?key=820c4a6ca4694063ab6002be1d1c63d3&info=你是谁
网页返回得到
{"code":100000,"text":"我是棒棒哒cortana"}
http://www.tuling123.com/openapi/api?key=820c4a6ca4694063ab6002be1d1c63d3&info=你能干什么
{"code":100000,"text":"问我会什么,这要看你的脑洞有多大?"}
http://www.tuling123.com/openapi/api?key=820c4a6ca4694063ab6002be1d1c63d3&info=播放音乐
{"code":100000,"text":"要听啥?"}
语音识别模块---语音音频文件-ESP返回讯飞识别-识别结果给ESp--结果再给百度语音生成-ESP驱动语音模块读出
基于讯飞语音的识别和图灵机器人的具体智能反馈,百度语音的播放,原因是讯飞语音的free版似乎播放做了限制
标签:讯飞语音 反馈 访问 response 打开 port alt put json
原文地址:https://www.cnblogs.com/kekeoutlook/p/9384936.html