HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError:401客户端错误:访问被拒绝
这是我的计划:
import pyoxford
text="welcome"
api=pyoxford.speech("client id","Client secret")
binary=api.text_to_speech(text)
with open("voice.wav","wb") as f:
f.write(binary)
recognized =api.speech_to_text("voice.wav")
if text==recognized:
print("bravo")
这里是pyoxford的文档。
我认为问题来自我的 id_client 或我的客户端密码。我试过了:
(id_client=Bing speech preview key1 / client_secret=bing speech preview key 2)
(id_client=Bing speech preview key2 / client_secret=bing speech preview key 1)
(id_client=my name / client_secret=bing speech preview key 1)
(id_client=microsoft data market account id / client_secret=bing speech preview key 1)
感谢您的帮助!
答案 0 :(得分:1)
感谢您的询问。 client-id可以是您的appname,客户端密钥是您在注册时获得的订阅密钥。