OpenNewsLabs / autoEdit_2

Fast text based video editing, node Electron Os X desktop app, with Backbone front end.
https://opennewslabs.github.io/autoEdit_2/
MIT License
421 stars 56 forks source link

Unauthorized when using IBM Watson from non-UK region #38

Closed sedubois closed 6 years ago

sedubois commented 7 years ago

As the title says, I tried Watson for the first time and set it up in the Germany region, but then the watson subdomain needs to be suffixed with -fra (Frankfurt, I guess), which autoEdit2 doesn't take into account and just throws an unauthorized error.

Would be great to either be flexible on the region or at least give a tip that the UK region is required.

pietrop commented 7 years ago

Thanks for flagging this @sedubois.

If I understand this right, when you get the credentials from Watson, it gives you a URL, username and password. Are you saying the URL you get if you chose Germany as a region is not https://stream.watsonplatform.net/speech-to-text/api but is something else? with a region prefix?

In autoEdit, I used the watson-developer-cloud, speech_to_text to communicate with Watson. And as you can see here in their code they hard coded the url in. If this is the problem it be good to raise an issue on their repo, linking to this issue if needed as an example use case, and then once they fix it (by adding the url as parameter) I can update it in autoEdit by passing the url as an optional parameter, and adding it to the settings panel as well.

Let me know if that makes sense, and if you think that, it might be the problem or not.

sedubois commented 7 years ago

@pietrop yes, the URL for Germany was different, it was something like https://stream-fra.watsonplatform.net. It looks indeed like their lib should take the region into account, but I'm really not familiar with this API besides what I wrote here.

pietrop commented 6 years ago

Apologies for the delay, did you managed to get it working?

Closing unless you need further help on this, in which case can re-open.

sedubois commented 6 years ago

Thanks, I workarounded this by just using the region that autoEdit2 was happy with.