diff --git a/speech_recognition/__init__.py b/speech_recognition/__init__.py index c8c7b1ab..01897311 100644 --- a/speech_recognition/__init__.py +++ b/speech_recognition/__init__.py @@ -1249,7 +1249,7 @@ def recognize_bing(self, audio_data, key, language="en-US", show_all=False): allow_caching = False # don't allow caching, since monotonic time isn't available if expire_time is None or monotonic() > expire_time: # caching not enabled, first credential request, or the access token from the previous one expired # get an access token using OAuth - credential_url = "https://api.cognitive.microsoft.com/sts/v1.0/issueToken" + credential_url = "https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken" credential_request = Request(credential_url, data=b"", headers={ "Content-type": "application/x-www-form-urlencoded", "Content-Length": "0", @@ -1277,7 +1277,7 @@ def recognize_bing(self, audio_data, key, language="en-US", show_all=False): convert_width=2 # audio samples should be 16-bit ) - url = "https://speech.platform.bing.com/speech/recognition/interactive/cognitiveservices/v1?{}".format(urlencode({ + url = "https://westus.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?{}".format(urlencode({ "language": language, "locale": language, "requestid": uuid.uuid4(),