-1

我正在使用 SDK 部分中提供的 python 包装器。我一直在尝试使用 python API 为创建的配置文件注册语音文件。

我能够成功创建配置文件并列出所有配置文件。但是,当我尝试使用创建的配置文件注册一个带有简单的 hello world 短语的语音 (.wav) 文件时,我收到错误“错误:root:注册配置文件错误。” 在跟踪中告诉'Exception: Error registration profile: Bad Request'。我已经通过将模块导入我的 python 文件以及在自述文件中描述的命令行中使用。

我不知道这个 API 是否有效。我认为我的小实验没有任何其他 API。即使在 SDK 的问题部分也没有适当的响应。

PS:这是我的第一个问题。请原谅我的风格和格式。以下是堆栈跟踪:

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
4

1 回答 1

1

演讲者识别代码要求注册音频“应至少 20 秒长且不超过 5 分钟。注册所需的总语音最少数量,在消除静音后,为 60 秒”每个文档

于 2016-05-19T02:20:24.777 回答