22-02-2024 , 08-09-2024
Simplify Voice Content Creation: Integrating SpeechGen.io with Make.com. This blog post guides you through integrating the automation service Make.com (formerly Integromat) with our neural network-based speech synthesis service, SpeechGen.io. This integration allows for the automation of text-to-speech processes, making content creation easier and more efficient.
We cover two methods based on the length of the text you want to convert to speech:
For texts up to 2000 characters: This method involves a quick request and immediate receipt of the speech output. It's perfect for short texts that need to be converted quickly.
For texts over 2000 characters: This method uses two requests. The first request sends the text with voice settings for conversion. The second request, which should be made no sooner than one minute later, retrieves the finished audio file. This approach ensures that longer texts are processed efficiently without overloading the system.
Make.com facilitates the automation of these processes without the need for deep technical knowledge. You can set up triggers to automatically start the text-to-speech process when certain conditions are met, such as the addition of new text to your CMS or database.
To begin with the integration, you'll need to familiarize yourself with our API. You can find all the necessary information, including documentation and FAQs, at SpeechGen.io API FAQ.
In this blogpost we’ll learn how to generate an Mp3 file from text using SpeechGen, then upload that Mp3 File to DropBox.
You can download and import the demo project json f shown in this blog and use it.
Login to Make.com & Click "Create a new scenario".
Search for "HTTP" and select "HTTP" from the list of available modules.
Input URL as https://speechgen.io/index.php?r=api/text
Then Click “Add parameter” to add Query params to our request
We need to input 4 parameters in total, so let’s add 3 more.
Now it’s time to run and test your scenario.
Click on this bubble to see the result of your request.
Focus on the output part, You’ll see ‘Data’.
You can see ‘file’ which’s the URL of the generated Mp3 file of our text
If you navigate to this URL, you can play and download the Mp3 file.
To make the data from SpeechGen easily accessible by other modules, we can add another Module to our Scenario.
Hover your mouse next to the first module we have, you’ll see a plus button, click on it
Search for 'JSON' and select this option.
Then Select "Parse JSON" so we could export the data from SpeechGen into multiple variables we can use in our scenario.
Click here (JSON string) to input ‘Data’ from the previous HTTP module
Click ‘Data’ to add it to the field and click OK to save changes.
Click ‘Run Once’ to execute the Scenario.
Select ‘Run Anyway’ to force Make to run the Scenario.
This is because JSON shouldn’t be the last module in the scenario, since it transforms the data from another module and we’re not doing anything with that data, in this case we just want to see the data first, then decide what to do with it.
Click the bubble above the JSON module to see the data we got.
Now the data that was all under ‘Data’ is now in individual variables that we can use in the next modules…
You can also notice the ‘file’ variable that had the URL of the Generated Mp3 File which we’ll use in the next module.
Now let’s upload the generated Mp3 file to Dropbox, to do that we need to download the Mp3 file in this scenario first.
Select Get File so we could download the Mp3 File inside the Scenario.
Most modules only require the URL, but DropBox requires Direct input of actual file data.
Map the ‘file’ variable, which’s the URL we can use to get the file.
Then we’ll add the DropBox module.
Choose the folder to save to inside your Dropbox, then Choose Map so we could change the name of the uploaded Mp3 File.
Make sure you add the ‘.mp3’ file extension at the end of the name, so it’d easier for Dropbox to recognize it as an Mp3 file you can play.
After running the Scenario, we have the File uploaded to DropBox
Now, we’re utilizing SpeechGen’s Long text API to generate a Long TTS.
The second method is designed for texts longer than 2000 characters. Unlike the first method, which quickly converts short texts into speech, this approach involves two steps due to the processing time required for longer texts.
The main difference from the first method is the need for a second request due to the longer processing time. This method ensures efficient handling of extensive texts, making it suitable for creating longer audio content.
Then we’ll upload the file to Dropbox as a demo, but the options are endless on how you can use this TTS API.
You can download and import the demo blueprint for Long Texts json shown in this blog and use it.
Login to Make.com & Click "Create a new scenario".
Search for "HTTP" and select "HTTP" from the list of available modules.
Input URL as https://speechgen.io/index.php?r=api/longtext
Then Click “Add parameter” to add Query params to our request
We need to input 4 parameters in total, so let’s add 3 more
Now it’s time to run and test your scenario
Click on this bubble to see the result of your request
Focus on the output part, You’ll see ‘Data’.
You can see ‘id’ which’s the ID of our request.
Now, To make the data from SpeechGen easily accessible by other modules, we can add another Module to our Scenario
Hover your mouse next to the first module we have, you’ll see a plus button, click on it
The search for ‘JSON’ and select this option
Then Select Parse JSON so we could export the data from SpeechGen into multiple variables we can use in our scenario
Click here to input ‘Data’ from the previous HTTP module.
Click ‘Data’ to add it to the field and click OK to save changes.
Click Run Once to execute the Scenario.
Select ‘Run Anyway’ to force Make to run the Scenario
This is because JSON shouldn’t be the last module in the scenario, since it transforms the data from another module and we’re not doing anything with that data, in this case we just want to see the data first, then decide what to do with it.
Click the bubble above the JSON module to see the data we got.
Now the data that was all under ‘Data’ is now in individual variables that we can use in the next modules.
You can also notice the ‘ID’ variable which we’ll use in the next steps to Get our TTS File URL.
Add a SLEEP Module to wait for the TTS to generate.
Set the SLEEP Duration between 1-5 minutes (60-300 seconds).
Let’s make it 200 seconds for our demo.
Now let’s upload the generated Mp3 file to Dropbox, to do that we need to download the Mp3 file in this scenario first.
Add another HTTP Module to Get the Generated TTS.
Insert the necessary Parameters:
Run the scenario to get the data and add another Parse JSON module
Map ‘Data’ from the previous HTTP module.
Run the scenario one more time to get data from the last Parse JSON Module, then Add another HTTP Module to download the file.
Select ‘Get File’ so we could download the Mp3 File inside the Scenario.
Most modules only require the URL, but DropBox requires Direct input of actual file data
Map the ‘file’ variable, which’s the URL we can use to get the file
Choose The folder to save to inside your Dropbox, then Choose Map so we could change the name of the uploaded Mp3 File
Make sure you add the ‘.mp3’ file extension at the end of the name, so it’d easier for Dropbox to recognize it as an Mp3 file you can play.
After running the Scenario, we have the File uploaded to DropBox
Integrating SpeechGen.io with Make.com opens up vast possibilities for automating voice content creation. Automating speech synthesis can be useful for:
Whether you're dealing with short notifications or lengthy educational materials, our guide will help you set up an efficient process with minimal effort. Transform your text into lively speech automatically, making your content more accessible and engaging for a wide audience.