-
Notifications
You must be signed in to change notification settings - Fork 2
Home
AWS AI Scratch Extension is a Scratch Extension that allows users to try Amazon Web Services AI Services like Amazon Polly and Amazon Translate for converting text to speech and translating text between different languages.
Try extension with sample project that translates from English to Spanish here.
Try extension here.
Find code on GitHub repo
For more information on Scratch extensions, see here.
Initialize AWS JavaScript SDK for connecting to the specified AWS region. This block asks AWS Access Key Id and Secret Access Key with JavaScript prompt method and remembers if it is started again without closing the browser. For more information on getting access keys, see here. Please note that you should keep your AWS secret keys private, and I recommend you to apply 'Least Privileges' practice for these credentials by adding AmazonPollyReadOnlyAccess and TranslateReadOnly policies only. For more information, see IAM Best Practices.
Selects the language that will be used by Amazon Polly. Currently supported languages are English, Spanish, French, German, Italian and Turkish.
Converts text to speech using Amazon Polly synthesizeSpeech method in selected language and plays the audio file.
Selects the language that will be used as source language by Amazon Translate. Currently supported languages are: Currently supported languages are English, Spanish, French, German, Italian and Turkish. Please note that Amazon Translate supports the translation from English to other languages and from other languages to English only for now.
Selects the language that will be used as the target language by Amazon Translate.
Translates the text from selected source language to selected target language using Amazon Translate translateText method and sets translatedText variable.
Contains the translation result.