Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speaker Enrollment returns bad request #49

Open
ishwara-bhat opened this issue Apr 27, 2020 · 3 comments
Open

Speaker Enrollment returns bad request #49

ishwara-bhat opened this issue Apr 27, 2020 · 3 comments

Comments

@ishwara-bhat
Copy link

Hi,
I tried the speaker enrollment API
on end point
"https://proxy.api.deepaffects.com/audio/generic/api/v2/sync/diarization/enroll?apikey=" + DEEP_AFFECTS_OFFICIAL_KEY

with payload
payload = {}
payload["content"] = audiodata
payload["sampleRate"] = 48000
payload["languageCode"] = "en-US"
payload["speakerId"] = username
payload["encoding"] = encodingstring

It returns bad request. I'm sure that my encoding and audio data is fine. The same audio data and encoding is accepted by emotion detection API and processed correctly.

@gargsanchit31
Copy link

May be your audiodata does not have sufficient speech content. Try with the audio having at least 6-10 seconds of data.

@ishwara-bhat
Copy link
Author

ishwara-bhat commented Apr 27, 2020

Thanks a lot. It my mistake. It is returning success now. However,
a) when I try it with "interaction analytics, I did not get it to recognize. "speakerIds" is given without quotes. Is this ok?
b) Also, though I give 1 as the value for "speakers", it returns multiple speakers.

Here are my parameters
diarizationurl = "https://proxy.api.deepaffects.com/audio/generic/api/v1/async/analytics/interaction"
querystring = {"apikey":DEEP_AFFECTS_OFFICIAL_KEY, "webhook":RUN_SVC_BASEURL +"/initanalyticsresp"}
payload["languageCode"] = "en-US"#Deepaffects language codes are not known
payload["speakers"] = 1
payload[speakerIds] = [usergivenname]
payload ["sampleRate"] = 48000
payload ["metrics"] = ["all"]

@gargsanchit31
Copy link

(a) I don't understand what do you mean by "speakerIds without quotes"
(b) speakers parameter is not valid.

I request you follow the updated docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants