Exercise - Customizing Azure AI services as Azure Functions
In this unit, you'll modify the source language and you'll change the target language.
In the Visual Studio Code, go to the Device\DevKitTranslator.ino. There are 9 languages described and Chinese is selected as a default language.
Remove Chinese, change the default language to English and save it.
Open the Functions\SpeechTranslation.cs. The target language is defined as English (en-US).
Change the target language to Spanish (es-ES) and save it.
Note
You can find many supported languages by Speech Translation API from the Microsoft page.
Click F1, type, and select Azure IoT Device Workbench: Deploy to Azure.... If Visual Studio Code asks for confirmation for redeployment, click Yes.
Make sure the deployment is successful.
Click F1 again, type, and select Azure IoT Device Workbench: Upload Device Code. It starts to compile and upload the code to DevKit.
The DevKit reboots and starts running the code.
Test the project
After app initialization, follow the instructions on the DevKit screen. The default source language is Chinese.
To select another language for translation:
- Press button A to enter setup mode.
- Press button B to scroll all supported source languages.
- Press button A to confirm your choice of the source language.
- Press and hold button B while speaking, then release button B to initiate the translation.
- The translated text in English shows on the screen.
On the translation result screen, you can:
- Press buttons A and B to scroll and select the source language.
- Press the B button to talk. To send the voice and get the translation text, release the B button.