Tutorial: Text to Audio Translator Agent
This agent can easily translate any text into a variety of languages supported by Google Cloud Translate and have it converted into audio format. Whether you're looking to communicate across different languages or create audio versions of your documents, this agent is here to assist every step of the way.
RapidAPI Key
RapidAPI provides a variety of endpoints for various purposes. Among these, the Google translate endpoint is utilized by this agent.
Follow the following steps to get your Rapid API key.
- Go to https://rapidapi.com/. If you do not have an account, proceed to create one by following the registration process.
- After completing the sign up process, you will be assigned a default API key that you can access here. Copy your API key using the
copy icon
. You can also click the eye icon to see your API key.

Google Translate Subscription
- Navigate to this link and go to the pricing tab.

- Select a subscription plan from the options available: Basic (free), Pro , Ultra Plan or Mega plan. The basic plan allows 1000 API requests per month for free.

- Then, click the
Subscribe
button.

- Subscription created successfully.

PlayHT Credentials
- Go to https://play.ht/signup and create your account to get your User ID and secret key. (Skip this process if you already have one.)
- Navigate to the left side bar and click on
API Access
.

- Copy your Use ID and click
Generate Secret Key
to obtain your secret key.

- Then, copy your Secret key.

Agent Setup
- In
SmythOS
, navigate to the Templates tab.

- You can scroll down to find the
Text to Audio Translator
Agent or simply search for it in the Search tab, then click theRemix
button.

- Allow the template to initialize and configure.
LLM Prompt Component Setup
- Look for the LLM Prompt API Credentials component.

- Click on the gear icon to open the settings, then input your RapidAPI Key, PlayHT Secret key and PlayHT User ID - just remove the braces. Remember to click the check mark to save your configuration.

- You’re all set!
Test the Agent
- Open the ChatBot embodiment and click on the chat icon.

- Prepare the text to be converted into audio.
- Sample Prompt:
- Convert this text to Audio. Target language is English.
- The cat chased the mouse around the garden, their playful antics echoing through the stillness of the afternoon.
- Sample Prompt:

- The agent has successfully converted the text into audio. You can listen to the audio by clicking the provided MP3 audio link.
