MicrosoftDocs / ai-fundamentals

Code samples for AI fundamentals
MIT License
834 stars 559 forks source link

The method used to create the "cog_region" variable no longer gives the right result #5

Closed davidokeyode closed 4 years ago

davidokeyode commented 4 years ago

File: 02b - Speech.ipynb Link: https://github.com/MicrosoftDocs/ai-fundamentals/blob/master/02b%20-%20Speech.ipynb Issue Description: found in "Line 49"

"cog_region = cog_endpoint[8:cog_endpoint.find('.')]\n",

For new cognitive service resources, this variable returns the name and not the region of the resource which leads to "SpeechRecognitionResult(result_id=**, text="", reason=ResultReason.Canceled) later down the line

Worked around by statically entering the region of the resource

GraemeMalcolm commented 4 years ago

Thanks @davidokeyode - fixed!