Text translation using Microsoft Azure Cognitive service Text_Translate
+ How To Add This Control To Your Project (Click to Expand)
- Make sure you have the latest version of ARC installed.
- Select the Get button in this page to download the archive file.
- Double click the downloaded archive file to execute installer.
- The installer will add this control to ARC.
- Load ARC and press the Project -> Add Control button from the menu.
- Choose the Artificial Intelligence category tab.
- Press the Translate icon to add the control to your project.
Use the Microsoft Translate Text cloud service to translate text in any other languages supported by the API.
Input text language is auto detected.
For example , you can translate English only responses returned by Microsoft Cognitive Vision plugin.
This service requires an internet connection. That means your EZ-B will need to be put into Wi-Fi Client Mode. Consult the appropiate learn tutorial for changing the EZ-B to Wi-Fi Client Mode or add a second USB WiFi adapter from here: http://www.ez-robot.com/Tutorials/Course/5
What Can You Do?
You will need this plugin added to the project.
And with this simple line of code in a script ....
translate("I see an humanoid robot across the windows","fr")
result will be :
and EZB result variables will be set.
With ControlCommand() and Blocky :
Example to translate in a script English only responses returned by Microsoft Cognitive Vision plugin.
$result =("I am " + $VisionConfidence + " percent certain that i see " + $VisionDescription)
If language to translate is not entered , plugin configuration default will be used
translate("If omitted the plugin default language will be used for translation")
You can also test translation directly in the plugin console :
Default Translated Language - Code of the default language in which the input text to translate will be translated - can be selected in a list of the languages supported by the API
Translated Text Variable - The variable which holds the translated text. This can be used in your Scripts.
Detected Language Variable - The variable which holds the detected language code of the input text to translate. This can be used in your Scripts.
API Key - Your key for using the Microsoft Text Translate service. There are instructions in this document below for signing up and obtaining a key.
The subscription that you will need from Microsoft is called Translator Text API
It's free until 2 000 000 characters translated every month.
To get the subscription , you need if you don't have already one , to create an Azure account
1) Visit the Microsoft Azure site azure.microsoft.com/en-us/?v=17.14 and create a free try account.
After 1 month , you will be asked to transform your try account in a normal one but free service option will stay available.
Follow the Azure Account subscription process until you get your account.
2) Access to Azure Portal ( Click Portal on left up of the Azure home window) - after authentification you access to your Azure Portal.
In the Dashboard , you will see all the Azure Services you have subscribed even when they are free.
3) Add the Translator Text service. To illustrate the add service process - see below how I add a new free service to my account Vocal_translator
4) Copy the Key 1
5) Paste the Key in the API key field of the plugin configuration form and Save
The information contained in this website is for general information purposes only. The information is provided by Jean-Luc Bénard and while we endeavour to keep the information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.
In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website.