Conversion of text translated by Google Translator to speech by Amazon Polly
Tags: aws, google, translation, tutorial
Published: 2021-07-27 12:39:09

---
title: Conversion of text translated by Google Translator to speech by Amazon Polly
published: true
date: 2021-07-22 12:20:12 UTC
tags: #aws, #google, #translation, #tutorial
canonical_url: https://tech.forums.softwareag.com/t/conversion-of-text-translated-by-google-translator-to-speech-by-amazon-polly/243076
---

## Summary

This article describes a business use case where the text translated by **Google Translator** will be converted to speech by **Amazon Polly**.

## Pre-requisites

- User should have a working [webMethods.io](http://webmethods.io/) Integration tenant.

- User should have a working **Google** and **Amazon AWS** account.

## Steps

1. Login to [webMethods.io](http://webmethods.io/)Integration tenant and create a FlowService.

2. Add the **Google Translator** connector and select the **Translate Text** operation. Select **Custom OAuth** under **Configure Accounts** to add an account. Provide all the required details in the window that appears and click **Add**.
> _ **Note:** _ Refer to the following article to know more about Google OAuth 2.0 connection in [webMethods.io](http://webMethods.io),  
> [Google OAuth 2.0 Connection in webMethods.io](https://tech.forums.softwareag.com/t/google-oauth-2-0-connection-in-webmethods-io/237386)
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/9/4/94382df42689d61b664cca11affc0b6a2dbab882_2_690x227.png)
3. Click **Edit Mapping** option in the top right corner to input the values for the selected operation. Provide the required inputs and proceed.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/5/c/5c5c430650d878fa95971c5e628178463acd0788_2_690x252.png)
4. In the next steps add if-else conditions on the basis of **translatedText** response.
_**If Condition**_
5. If **translatedText is not empty** then add the **Amazon Polly** connector and select **startSpeechSynthesisTask** operation. Select **Create account manually** under **Configure Accounts** to add an account. Provide all the required details in the window that appears and click **Add**.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/8/38325e1f30e43cb969d3458020541ce6a7f5f623_2_690x290.png)
6. Click **Edit Mapping** option in the top right corner to input the values for the selected operation. Map the **translatedText** to **Text** field, provide the other required inputs, and proceed.  
Make sure an existing S3 bucket name is provided for **OutputS3BucketName** field to store the speech file in the mentioned **AWS S3** bucket.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/b/1b9a9c1594d455d5154d510ec940780e32e4efba_2_690x376.png)
_**Else Condition**_
7. Else throw an error with a custom message like **Text couldn’t be translated**
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/b/ebb91c2d96e089284245ad8a07aaeb51019dea43_2_690x340.png)
8. Save and run the flow from the top right corner. Download the speech file from the **AWS S3 Console**. It will be present in the same **AWS S3** bucket provided earlier in step 6.

[Read full topic](https://tech.forums.softwareag.com/t/conversion-of-text-translated-by-google-translator-to-speech-by-amazon-polly/243076)