您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

从必应语音迁移到语音服务Migrate from Bing Speech to the Speech service

本文介绍如何将应用程序从必应语音 API 迁移到语音服务。Use this article to migrate your applications from the Bing Speech API to the Speech service.

本文概述了必应语音 Api 与语音服务之间的差异,并建议了迁移应用程序的策略。This article outlines the differences between the Bing Speech APIs and the Speech service, and suggests strategies for migrating your applications. 必应语音 API 订阅密钥不适用于语音服务;需要新的语音服务订阅。Your Bing Speech API subscription key won't work with the Speech service; you'll need a new Speech service subscription.

单个语音服务订阅密钥授予对以下功能的访问权限。A single Speech service subscription key grants access to the following features. 每个功能单独计量,以便仅针对你使用的功能收费。Each is metered separately, so you're charged only for the features you use.

语音 SDK 是必应语音客户端库的功能替换,但使用了不同 API。The Speech SDK is a functional replacement for the Bing Speech client libraries, but uses a different API.

功能比较Comparison of features

语音服务很大程度上与必应语音相似,但有以下差异。The Speech service is largely similar to Bing Speech, with the following differences.

功能Feature 必应语音Bing Speech 语音服务Speech service 详细信息Details
C# SDKC# SDK ✔️ ✔️ Speech service 支持 Windows 10、通用 Windows 平台 (UWP) 和 .NET Standard 2.0。Speech service supports Windows 10, Universal Windows Platform (UWP), and .NET Standard 2.0.
C++ SDKC++ SDK ✔️ Speech service 支持 Windows 和 Linux。Speech service supports Windows and Linux.
Java SDKJava SDK ✔️ ✔️ 语音服务支持 Android 和语音设备。Speech service supports Android and Speech Devices.
连续语音识别Continuous speech recognition 10 分钟10 minutes 无限制Unlimited 语音 SDK 支持无限制的连续识别,并在超时或断开连接时自动重新连接。The Speech SDK supports unlimited continuous recognition, and automatically reconnects upon timeout or disconnect.
部分或中期结果Partial or interim results ✔️ ✔️ 通过语音 SDK 支持。Supported with the Speech SDK.
自定义语音模型Custom speech models ✔️ ✔️ 必应语音需要单独的自定义语音订阅。Bing Speech requires a separate Custom Speech subscription.
自定义语音字体Custom voice fonts ✔️ ✔️ 必应语音需要单独的自定义语音订阅。Bing Speech requires a separate Custom Voice subscription.
24 kHz 语音24-kHz voices ✔️
语音意向识别Speech intent recognition 需要单独的 LUIS API 调用Requires separate LUIS API call 已集成(与 SDK)Integrated (with SDK) 可以将 LUIS 密钥用于语音服务。You can use a LUIS key with the Speech service.
简单意向识别Simple intent recognition ✔️
批量听录长音频文件Batch transcription of long audio files ✔️
识别模式Recognition mode 通过终结点 URI 手动Manual via endpoint URI 自动Automatic 语音服务中不提供识别模式。Recognition mode is not available in the Speech service.
终结点位置Endpoint locality 全球Global 区域Regional 区域终结点改善延迟。Regional endpoints improve latency.
REST APIREST APIs ✔️ ✔️ 语音服务 REST Api 与必应语音 (不同的终结点) 兼容。The Speech service REST APIs are compatible with Bing Speech (different endpoint). REST API 支持文本转语音以及限制的语音转文本功能。REST APIs support text-to-speech and limited speech-to-text functionality.
Websocket 协议WebSockets protocols ✔️ 语音 SDK 针对需要与服务建立持续连接的功能对 web 套接字连接进行抽象,因此不再支持手动订阅。The Speech SDK abstracts web socket connections for functionality that requires a constant connection to the service, so there is no longer support to subscribe to them manually.
服务到服务 API 调用Service-to-service API calls ✔️ 通过 C# 服务库在必应语音中提供。Provided in Bing Speech via the C# Service Library.
开源 SDKOpen-source SDK ✔️

语音服务使用基于时间的定价模型 (而不是基于事务的模型) 。The Speech service uses a time-based pricing model (rather than a transaction-based model). 有关详细信息,请参阅 语音服务定价See Speech service pricing for details.

迁移策略Migration strategies

如果你或你的组织在开发或生产环境中具有使用必应语音 API 的应用程序,则应将其更新为尽快使用语音服务。If you or your organization have applications in development or production that use a Bing Speech API, you should update them to use the Speech service as soon as possible. 请参阅 语音服务文档 ,了解可用的 sdk、代码示例和教程。See the Speech service documentation for available SDKs, code samples, and tutorials.

语音服务 REST api 与必应语音 api 兼容。The Speech service REST APIs are compatible with the Bing Speech APIs. 如果当前正在使用必应语音 REST Api,只需更改 REST 终结点,并切换到语音服务订阅密钥。If you're currently using the Bing Speech REST APIs, you need only change the REST endpoint, and switch to a Speech service subscription key.

如果使用特定编程语言的必应语音客户端库,则迁移到语音 SDK 需要更改应用程序,因为 API 不同。If you're using a Bing Speech client library for a specific programming language, migrating to the Speech SDK requires changes to your application, because the API is different. 语音 SDK 可以简化代码,同时使你可以访问新功能。The Speech SDK can make your code simpler, while also giving you access to new features. 语音 SDK 提供多种编程语言。The Speech SDK is available in a wide variety of programming languages. 所有平台上的 API 均类似,从而简化了多平台开发。APIs on all platforms are similar, easing multi-platform development.

语音服务未提供全局终结点。The Speech service doesn't offer a global endpoint. 确定应用程序在使用一个区域终结点处理其所有流量的情况下,能否高效运行。Determine if your application functions efficiently when it uses a single regional endpoint for all of its traffic. 如果不能,则使用地理位置来确定最高效的终结点。If not, use geolocation to determine the most efficient endpoint. 你需要在每个所使用的区域中使用单独的语音服务订阅。You need a separate Speech service subscription in each region you use.

语音 SDK 入门:To get started with the Speech SDK:

  1. 下载语音 SDKDownload the Speech SDK.
  2. 完成语音服务 快速入门指南教程Work through the Speech service quickstart guides and tutorials. 另请查看代码示例来体验新的 API。Also look at the code samples to get experience with the new APIs.
  3. 更新应用程序以使用语音服务。Update your application to use the Speech service.

支持Support

必应语音客户应通过打开支持票证来联系客户支持。Bing Speech customers should contact customer support by opening a support ticket. 如果你的支持需要一个技术支持计划,也可以与我们联系。You can also contact us if your support need requires a technical support plan.

有关 Speech service、SDK 和 API 支持,请访问语音服务 支持页For Speech service, SDK, and API support, visit the Speech service support page.

后续步骤Next steps

请参阅See also