Azure文本到语音SDK与API:何时使用哪个?

发布于 2025-02-13 03:31:00 字数 613 浏览 2 评论 0原文

我是使用Azure认知服务(以及一般编程)的新手。

语音服务的Azure文本通过两个接口提供:Speech SDK和REST API。我想知道什么时候应该选择使用SDK或REST API? SDK比API的优点是什么,反之亦然?
documentation SDK对此很模糊。它说:

在某些情况下,您不能或不应该使用语音SDK。在这种情况下,您可以使用REST API访问语音服务。例如,使用语音到文本REST API v3.0进行批处理转录和自定义语音。

对于上下文,我希望实现一个文本到语音应用程序,该应用程序需要对话字符串的json,将每个字符串合成到语音文件中并将其保存到云存储中。到目前为止,我一直在本地使用演讲SDK,并设法将语音文件保存到本地存储中,但是我需要在云中进行此操作。

让我知道我是否应该提供更多详细信息,并提前感谢任何洞察力!

I’m new to using Azure Cognitive Services (and programming in general).

The Azure Text to Speech service is provided through two interfaces: the Speech SDK and the REST API. I was wondering when one should choose to use the SDK or REST API? What are the advantages of the SDK over the API, and vice versa?
The documentation of the Azure Speech SDK is quite vague on this. It says:

In some cases, you can't or shouldn't use the Speech SDK. In those cases, you can use REST APIs to access the Speech service. For example, use the Speech-to-text REST API v3.0 for batch transcription and custom speech.

For context, I’m looking to implement an text-to-speech application that takes a JSON of conversation strings, synthesizes each string to a speech file and saves it to cloud storage. So far I've been using the Speech SDK locally and have managed to save speech files to local storage, but I need to do this in the cloud.

Let me know if I should provide more details and thanks in advance for any insight!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何以心动 2025-02-20 03:31:00

文档指的是要在批处理模式下转录或综合语音的情况下的REST API使用,即,而不是实时。如果需要实时转录或合成结果,则应使用SDK API。

请参阅文本到语音API的概述,包括批处理和实时文档的链接, https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/text-service/text-te-peech-spech

Documentation refers to the REST API use in case you want to transcribe or synthesize speech in batch mode, ie, not in real-time. If you want real-time transcription or synthesis results, you shall use SDK APIs.

See the overview of text to speech APIs including links to specific documentation for batch and real-time https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/text-to-speech

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文