说话者识别-Microsoft Oxford上的Bad Request错误 [英] Speaker recognition - Bad Request error on microsoft oxford
问题描述
我正在使用SDK部分中提供的python包装器.我一直在尝试使用python API为创建的配置文件注册语音文件.
I am using the python wrapper that has been given in the SDK section. I've been trying to enroll a voice file for a created profile using the python API.
我能够创建一个配置文件并成功列出所有配置文件.但是,当我尝试使用创建的配置文件使用简单的hello world短语注册语音(.wav)文件时,出现错误'ERROR:root:Error enrolling profile'. 例外:注册个人资料时出错:错误的请求" .我已经按照自述文件中的说明将模块导入到我的python文件以及命令行中.
I was able to create a profile and list all profiles successfully. But when I try to enroll a voice (.wav) file with a simple hello world phrase with the created profile, I get the error 'ERROR:root:Error enrolling profile.' which in the trace tells 'Exception: Error enrolling profile: Bad Request'. I've used by importing the module to my python file as well as in command line as described in the Readme.
我不知道此API是否有效.我认为我的小实验没有其他API.即使在SDK的问题部分中也没有适当的答案.
I have no clue whether this API will work or not. I don't think there is any other API for my little experiment. There are no proper responses even in the issues section of the SDK.
PS:这是我的第一个问题.请原谅我的风格和格式. 以下是堆栈跟踪:
PS: This is my first question. Pardon my styles and formats. The following is the stack trace:
ERROR:root:Error enrolling profile.
127.0.0.1 - - [17/May/2016 15:55:44] "POST /verify-voice HTTP/1.1" 500 -
INFO:werkzeug:127.0.0.1 - - [17/May/2016 15:55:44] "POST /verify-voice HTTP/1.1" 500 -
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Rajagopal/Development/GitRepos/pet-projects/barabara-server/wsgi/barbara/views/users.py", line 57, in voice_register
enroll_profile(app.config['MICROSOFT_SPEAKER_RECOGNITION_KEY'], user.speaker_profile_id, _created_file_path)
File "/Rajagopal/Development/GitRepos/pet-projects/barabara-server/wsgi/oxford/speaker_recognition/Identification/EnrollProfile.py", line 48, in enroll_profile
enrollment_response = helper.enroll_profile(profile_id, file_path)
File "/Rajagopal/Development/GitRepos/pet-projects/barabara-server/wsgi/oxford/speaker_recognition/Identification/IdentificationServiceHttpClientHelper.py", line 155, in enroll_profile
raise Exception('Error enrolling profile: ' + res.reason)
Exception: Error enrolling profile: Bad Request
推荐答案
演讲者身份"代码要求注册音频应至少20秒长且不超过5分钟.注册所需的最小语音总数, 文档.
The Speaker Identification code requires that enrollment audio "should be at least 20 seconds long and no longer than 5 minutes. The minimum number of total speech needed for enrollment, after removing silence, is 60 seconds" per documentation.
这篇关于说话者识别-Microsoft Oxford上的Bad Request错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!