说话人识别API出错:“找不到资源或路径。”

2024-09-27 21:27:40 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试使用jupyterpython运行说话人识别API的注册配置文件代码。在

不幸的是,我收到一个错误:

{ "error": { "code": "NotFound", "message": "Resource or path can't be found." } }

代码如下:

^{pr2}$

Tags: orpath代码apimessage配置文件错误code
1条回答
网友
1楼 · 发布于 2024-09-27 21:27:40

identificationProfileId是URL路径的一部分,不是查询参数。您应该执行以下操作:

params = urllib.urlencode({
        # Request parameters
        'shortAudio': 'true',
    })
...
conn.request("POST", "/spid/v1.0/identificationProfiles/{0}/enroll?{1}".format(user1, params), body, headers)

相关问题 更多 >

    热门问题