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

什么是语音助手?What is a voice assistant?

使用语音服务的语音助手使开发人员可以为其应用程序和体验创建自然、人为的对话接口。Voice assistants using the Speech service empowers developers to create natural, human-like conversational interfaces for their applications and experiences.

语音助手服务在设备和助手实现之间提供快速、可靠的交互,使用 (1) 直接线路语音 (通过 Azure 机器人服务) 将语音功能添加到机器人,或 (2) 用于语音命令方案的自定义命令。The voice assistant service provides fast, reliable interaction between a device and an assistant implementation that uses either (1) Direct Line Speech (via Azure Bot Service) for adding voice capabilities to your bots, or, (2) Custom Commands for voice commanding scenarios.

选择助手解决方案Choosing an assistant solution

创建语音助手的第一步是确定其用途。The first step to creating a voice assistant is to decide what it should do. 语音服务提供了多种补充性解决方案,用于编制助手交互。The Speech service provides multiple, complementary solutions for crafting your assistant interactions. 你可以将语音输入和语音功能添加到使用 Azure Bot 服务生成的灵活且功能多样的机器人,并使用 直接 Line Speech 通道,或利用为简单的语音命令方案创作 自定义命令 应用的简易性。You can add voice in and voice out capabilities to your flexible and versatile bot built using Azure Bot Service with the Direct Line Speech channel, or leverage the simplicity of authoring a Custom Commands app for straightforward voice commanding scenarios.

如果你想要...If you want... 然后考虑 .。。Then consider... 例如…For example...
具有强大技能集成和完全部署控制的开放式对话Open-ended conversation with robust skills integration and full deployment control 带有 直接线路语音 通道的 Azure 机器人服务机器人Azure Bot Service bot with Direct Line Speech channel
  • "我需要去西雅图""I need to go to Seattle"
  • "我可以订购哪种比萨饼?""What kind of pizza can I order?"
通过简化的创作和托管,提供语音命令或简单的面向任务的对话Voice commanding or simple task-oriented conversations with simplified authoring and hosting 自定义命令Custom Commands
  • "打开高架灯""Turn on the overhead light"
  • "使其成为5度"Make it 5 degrees warmer"
  • 此处提供的其他示例Other samples available here

如果你还不确定希望你的助手处理哪种情况,我们建议将 Line Speech 作为最佳的默认选择。We recommend Direct Line Speech as the best default choice if you aren't yet sure what you'd like your assistant to handle. 它与一组丰富的工具和创作辅助工具(例如 虚拟助手解决方案和企业模板 )以及用于基于常见模式构建并使用现有知识源的 QnA Maker 服务 相集成。It offers integration with a rich set of tools and authoring aids such as the Virtual Assistant Solution and Enterprise Template and the QnA Maker service to build on common patterns and use your existing knowledge sources.

通过自定义命令,可以轻松地构建经过优化的丰富语音命令应用程序,以实现语音首次交互体验。Custom Commands makes it easy to build rich voice commanding apps optimized for voice-first interaction experiences. 它提供统一的创作体验、自动托管模型和相对较低的复杂性,从而帮助你集中精力为语音命令方案构建最佳解决方案。It provides a unified authoring experience, an automatic hosting model, and relatively lower complexity, helping you focus on building the best solution for your voice commanding scenarios.

助手解决方案的比较Comparison of assistant solutions

使用语音 SDK 生成语音助手的参考体系结构Reference Architecture for building a voice assistant using the Speech SDK

语音助手业务流程服务流的概念图Conceptual diagram of the voice assistant orchestration service flow

核心功能Core features

无论你选择 " 直接行语音 " 还是 " 自定义命令 " 来创建助手交互,你都可以使用一组丰富的自定义功能来自定义你的助理、产品和个性。Whether you choose Direct Line Speech or Custom Commands to create your assistant interactions, you can use a rich set of customization features to customize your assistant to your brand, product, and personality.

类别Category 功能Features
Custom 关键字Custom keyword 用户可以使用 "你好 Contoso" 等自定义关键字开始与助手对话。Users can start conversations with assistants with a custom keyword like "Hey Contoso." 应用使用 Speech SDK 中的自定义关键字引擎来完成此工作,可以使用 可在此处生成的自定义关键字对其进行配置。An app does this with a custom keyword engine in the Speech SDK, which can be configured with a custom keyword that you can generate here. 语音助手可以使用服务端关键字验证来提高关键字激活 (与独立) 设备的准确性。Voice assistants can use service-side keyword verification to improve the accuracy of the keyword activation (versus the device alone).
语音到文本Speech to text 语音助手使用语音服务的 语音到文本 将实时音频转换为识别的文本。Voice assistants convert real-time audio into recognized text using Speech-to-text from the Speech service. 此文本在助手实现和客户端应用程序中转录。This text is available, as it's transcribed, to both your assistant implementation and your client application.
文本到语音转换Text to speech 使用来自语音服务的 文本到语音转换 ,来自助手的文本响应。Textual responses from your assistant are synthesized using Text-to-speech from the Speech service. 然后,此合成将作为音频流提供给客户端应用程序。This synthesis is then made available to your client application as an audio stream. Microsoft 提供了构建你自己的自定义优质神经 TTS 声音的功能,可为你的品牌提供一种语音。Microsoft offers the ability to build your own custom, high-quality Neural TTS voice that gives a voice to your brand. 若要了解详细信息,请联系我们。To learn more, contact us.

语音助手入门Getting started with voice assistants

我们专门提供了快速入门来帮助你在 10 分钟内运行代码。We offer quickstarts designed to have you running code in less than 10 minutes. 此表包含按语言组织的语音助手快速入门列表。This table includes a list of voice assistant quickstarts, organized by language.

示例代码和教程Sample code and Tutorials

GitHub 上提供了用于创建语音助手的示例代码。Sample code for creating a voice assistant is available on GitHub. 这些示例涵盖了用几种常用编程语言连接到助手的客户端应用程序。These samples cover the client application for connecting to your assistant in several popular programming languages.

自定义Customization

使用 Azure 语音服务构建的语音助手可以使用各种自定义选项。Voice assistants built using Azure Speech services can use the full range of customization options.

备注

自定义选项因语言/区域设置而异(请参阅支持的语言)。Customization options vary by language/locale (see Supported languages).

后续步骤Next steps