Home

Awesome


page_type: sample description: "Sample code for Microsoft Cognitive Services Voice Assistant" languages:


Build Status

<!-- For above fields, see: https://review.docs.microsoft.com/en-us/help/contribute/samples/process/onboarding?branch=master#yaml-front-matter-structure -->

Microsoft Cognitive Services - Voice Assistant Sample Code

<!-- Guidelines on README format: https://review.docs.microsoft.com/help/onboard/admin/samples/concepts/readme-template?branch=master Guidance on onboarding samples to docs.microsoft.com/samples: https://review.docs.microsoft.com/help/onboard/admin/samples/process/onboarding?branch=master Taxonomies for products and languages: https://review.docs.microsoft.com/new-hope/information-architecture/metadata/taxonomies?branch=master -->

Overview

This repository includes everything needed to build a sample Voice Assistant hosted in your own Azure subscription, with a client application of your choice. Voice Assistants use Microsoft's Speech SDK in the client application to connect to Direct Line Speech Channel and your Bot-Framework bot. Voice Assistants can be keyword activated using keyword model files in this repository or new ones you create.

If you are writing a Bot-Framework bot, read the tutorial Voice-enable your bot using the Speech SDK, and use sample clients in this repo to help you get started.

Or just browse individual components per the repository content below.

<!-- The repo has sample clients in C++, C# and Java, samples of [Voice Assistant](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/voice-assistants) clients for different platforms. It also includes a client tool for end-to-end regression testing of a Voice Assistant system. Sample code for building Voice Assistant clients, using Microsoft's Speech SDK and Direct Line Speech channel, including Custom Command 0-->

Repository Content

Sample Client Applications

FolderDescriptionLanguage/Platform
clientsLanding page for sample clients
clients\csharp-uwpUWP voice assistant client sample. An example UWP app that uses Window's new voice activation APIs, together with the Voice Assistant platform, to connect to your bot or Custom Commands application.C#, Universal Windows Platform (UWP)
clients\csharp-wpfWindows voice assistant client sample. Generic Windows tool to manually test your bot or Custom Commands applicationC#, Windows Presentation Foundation (WPF)
clients\cpp-consoleConsole client sample for Smart Speaker devices, configured via a json file to connect to your bot or Custom Commands application. It supports microphone input and audio playback. Build scripts for Raspberry Pi, GGEC Speaker and Windows are providedC++, Windows, Linux
clients\java-androidAn Android application (phone or tablet) configured to connect to your bot or Custom Commands applicationJava Android

Sample Keyword Models

FolderDescription
keyword-modelsA few keyword models (.table files) for you to try out. Or you can create your own -- See Create a custom keyword using Speech Studio

Test Code

FolderDescriptionLanguage/Platform
clients\csharp-dotnet-core\voice-assistant-testAutomated, multi-turn, end-to-end regression test for your bot or Custom Commands application. Supports WAV file input, text or Bot-Framework activitiesC# .NET Core

Articles

FileDescription
docs\CloudConnectionLogic.mdDiscusses options for when to connect to Direct Line Speech channel and how long to keep the connection open
docs\LocalBot.mdRunning & debugging your Bot locally while using Direct Line Speech Channel

Root Folder Files

FileDescriptionLanguage/Platform
.gitignoreDefine what to ignore at commit time
CODE_OF_CONDUCT.mdCode of Conduct for all Microsoft repositories
CONTRIBUTING.mdGuidelines for contributing to these samples
README.mdThis README file
LICENSE.mdThe license for these samples
SECURITY.mdInformation about reporting any security vulnerabilities to Microsoft
NOTICE.txtLicense of third party software incorporated in these samples
<!-- ## Prerequisites Outline the required components and tools that a user might need to have on their machine in order to run the sample. This can be anything from frameworks, SDKs, OS versions or IDE releases. ## Setup Explain how to prepare the sample once the user clones or downloads the repository. The section should outline every step necessary to install dependencies and set up any settings (for example, API keys and output folders). ## Runnning the sample Outline step-by-step instructions to execute the sample and see its output. Include steps for executing the sample from the IDE, starting specific services in the Azure portal or anything related to the overall launch of the code. ## Key concepts Provide users with more context on the tools and services used in the sample. Explain some of the code that is being used and how services interact with each other. -->

Clone the Repo

To build any of the sample client applications or deploy custom commands to your Azure subscription, you will first need to clone this GitHub repository:

    git clone https://github.com/Azure-Samples/Cognitive-Services-Voice-Assistant.git
    cd Cognitive-Services-Voice-Assistant

Related Microsoft GitHub Repos

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

Copyright (c) Microsoft Corporation. All rights reserved.