Speaker recognition - Bad Request error on microsoft oxford

2024/9/20 12:40:23

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.

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.

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: 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_appresponse = 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_exceptionreraise(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_appresponse = 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_requestrv = 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_exceptionreraise(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_requestrv = self.dispatch_request()File "/Library/Python/2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_requestreturn 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_registerenroll_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_profileenrollment_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_profileraise Exception('Error enrolling profile: ' + res.reason)
Exception: Error enrolling profile: Bad Request
Answer

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.

https://en.xdnf.cn/q/119220.html

Related Q&A

Remove list of phrases from string

I have an array of phrases: bannedWords = [hi, hi you, hello, and you]I want to take a sentence like "hi, how are tim and you doing" and get this:", how are tim doing"Exact case mat…

ImportError: No module named... (basics?) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.Want to improve this question? Add details and clarify the problem by editing this post.Closed 10 years ago.Improv…

How to pass python list address

I want to convert c++ code to python. I have created a python module using SWIG to access c++ classes.Now I want to pass the following c++ code to PythonC++#define LEVEL 3double thre[LEVEL] = { 1.0l, 1…

Python open says file doesnt exist when it does

I am trying to work out why my Python open call says a file doesnt exist when it does. If I enter the exact same file url in a browser the photo appears.The error message I get is:No such file or direc…

How to map one list and dictionary in python [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.Want to improve this question? Add details and clarify the problem by editing this post.Closed 4 years ago.Improve…

Sorting date inside of files (Python)

I have a txt file with names and dates like this name0 - 05/09/2020 name1 - 14/10/2020 name2 - 02/11/2020 How can I sort the text file by date? so that the file will end up like this name2 - 02/11/202…

Dicing in python

Code:-df = pd.DataFrame({col1:t, col2:wordList}) df.columns=[DNT,tweets] df.DNT = pd.to_datetime(df.DNT, errors=coerce) check=df[ (df.DNT < 09:20:00) & (df.DNT > 09:00:00) ]Dont know why this…

How to collect all specified hrefs?

In this test model I can collect the href value for the first (tr, class_=rowLive), Ive tried to create a loop to collect all the others href but it always gives IndentationError: expected an indented …

How do I sort data highest to lowest in Python from a text file?

I have tried multiple methods in doing this but none of them seem to work The answer comes up alphabetically insteadf=open("class2.txt", "r") scores=myfile.readlines() print(sorted(…

Determine if a variable is an instance of any class

How to determine if a variable is an instance in Python 3? I consider something to be an instance if it has __dict__ attribute.Example:is_instance_of_any_class(5) # should return False is_instance_of…