【发布时间】:2019-09-29 13:02:32
【问题描述】:
我在使用 Azure 认知服务时遇到了一些问题。我正在使用 REST/API 和 python 请求库。我必须设置 IdentificationProfileIds,但我不知道如何在这个帖子请求中插入 2 个或更多 id_person。
trump = "4aeXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
obama = "6c6XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
requests.post("https://westus.api.cognitive.microsoft.com/spid/v1.0/identificationProfiles/{identificationProfileIds}/enroll?shortAudio=False".format(identificationProfileIds = [obama + trump] ),
headers={"Ocp-Apim-Subscription-Key": "XXXXXXX", "Content-Type": "multipart/form-data"},
data = open('XXXXXXX_16000_mono_16bit.wav', 'rb').read())
【问题讨论】:
标签: python azure python-requests azure-cognitive-services