語音合成以及語音識別
阿新 • • 發佈:2018-12-20
AI開放平臺:http://ai.baidu.com/
圖靈機器人:http://www.tuling123.com/
語音合成以及語音識別:
hecheng.py# 圖靈機器人 import requests url = "http://openapi.tuling123.com/openapi/api/v2" data_dict = { "reqType":0, "perception": { "inputText": { "text": "北京" }, }, "userInfo"goto_tuling.py: { "apiKey": "c3a9ba0d958a43658a5acdcae50c13ae", "userId": "jinwangbas" } } def tl(text,uid): data_dict["perception"]["inputText"]["text"] = text data_dict["userInfo"]["userId"] = uid res = requests.post(url,json=data_dict) res_json = res.json() returnres_json.get("results")[0]["values"]["text"]