This sample demonstrates how to recognize keywords with Java using the Speech SDK for Android. See the accompanying article on the SDK documentation page which describes how to build this sample from scratch in Android Studio.
Note: this sample is not for the Speech Devices SDK and the Roobo device. If you are looking for further information on these, visit the Speech Devices SDK page.
- A PC (Windows, Linux, Mac) capable to run Android Studio.
- Version 3.1 of Android Studio.
- Android device or emulator (API 23: Android 6.0 Marshmallow or higher) enabled for development with a working microphone.
Note: more detailed step-by-step instructions are available here.
- By building this sample you will download the Microsoft Cognitive Services Speech SDK. By downloading you acknowledge its license, see Speech SDK license agreement.
- Download the sample code to your development PC.
- Open this folder as a project in Android Studio.
- Press Ctrl+F9, or select Build > Make Project.
- Connect your Android device to your development PC.
- Press Shift+F10, or select Run > Run 'app'.
- In the deployment target windows that comes up, pick your Android device.
Please note that this Speech SDK sample requires the RECORD_AUDIO permissions. As for Android API levels up to 22, requesting the permissions is handled at installation time but from API level 23 users are able to grant/revoke permissions at any time.
Note that this quickstart targets minSdkVersion 23.