Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.17k stars 4.53k forks source link

Sync function named Async #44308

Open DarthJahus opened 1 month ago

DarthJahus commented 1 month ago

Type of issue

Wrong function name. This method has to be renamed.

Description

The method SpeechSynthesizer.SpeakTextAsync() is described in the docs as:

Synthesize speech from plain text synchronously (returns when done synthesizing).

And does behave as a sync method.

However, it is named Async.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/microsoft.cognitiveservices.speech.speechsynthesizer.speaktextasync?view=azure-dotnet#microsoft-cognitiveservices-speech-speechsynthesizer-speaktextasync(system-string)

Content source URL

https://github.com/Azure/azure-docs-sdk-dotnet/blob/master/xml/Microsoft.CognitiveServices.Speech/SpeechSynthesizer.xml

Document Version Independent Id

65fd2d5a-dac3-6448-4166-d0155d9b687f

Article author

@azure-sdk

Metadata

github-actions[bot] commented 1 month ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @robch.

DarthJahus commented 1 month ago

I've also noticed something interesting:

The method StopSpeakingAsync() correctly stops the synchronous method described above. Which is good and means I won't have to rewrite my code.