NateRickard / Xamarin.Cognitive.Speech

A client library that makes it easy to work with the Microsoft Cognitive Services Speech Services Speech to Text API on Xamarin.iOS, Xamarin.Android, UWP, and Xamarin.Forms/.NET Standard libraries used by those platforms
MIT License
59 stars 18 forks source link

Auth errors #19

Closed donbing closed 5 years ago

donbing commented 5 years ago

i need to use westus.api.cognitive.microsoft.com for the auth uri

but the constructor on the BingSpeechApiClient is creating the auth client before my property value is set.

donbing commented 5 years ago

donbing commented 5 years ago

20 PR added

NateRickard commented 5 years ago

Good call, I clearly never tested changing the endpoint since I didn't have another url to use :) That said, I may refactor it to either rebuild the auth client when set or just use the constructor similar to what you did. Leaving it as a public property when it won't actually work correctly is probably not great...

NateRickard commented 5 years ago

Used your PR as a basis and resolved this in d8eaa9d46186a2523a47541eedffcd3e8095fdd5

Released an updated nuget, v2.1.3