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

IBM now uses an API key instead of username/password #325

Open
tyarkoni opened this issue Mar 23, 2019 · 3 comments
Open

IBM now uses an API key instead of username/password #325

tyarkoni opened this issue Mar 23, 2019 · 3 comments

Comments

@tyarkoni
Copy link
Collaborator

IBM's cloud services recently switched from a username/pass pair to an API key. Unfortunately, speech_recognition hasn't been updated yet (see open issue). This means we'll need to either switch to using IBM's own client library (probably the best long-term solution) or patch speech_recognition.

@tyarkoni
Copy link
Collaborator Author

On further investigation, it looks like we're not actually using speech_recognition to query the IBM API, but only to encode the audio. I have a vague recollection of you implementing it this way to solve some earlier problem with speech_recognition, @qmac. Either way, should be an easy fix—I'll just change the way we make the request in the IBMSpeechAPIConverter.

@qmac
Copy link
Collaborator

qmac commented Mar 23, 2019

Sounds good. Yea I did a split from speech_recognition when we wanted to request timestamps from the API. We could probably remove the dependency and write the audio encoding code ourselves.

@tyarkoni
Copy link
Collaborator Author

I went down a bit of a rabbit hole on this one... I think the IBM APIs for this are in a state of flux—they currently have 3 (!) different ways of authenticating (user/pass, service-specific key, and global IAM api key), and I'm fairly certain that the latest version of the API (released like 3 days ago) isn't actually supported by the watson-developer-cloud client at the moment. I imagine this will get fixed in the next few weeks, so I'll come back to this—just leaving this note to self here for posterity.

(We could also stick with the current approach and keep making direct HTTP requests, but they seem to discourage that now, plus the client library has some other nice features.)

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