Mastering - Enhance the quality of your audio and add sound
Introduction to Mastering
Mastering, a form of audio post production, comes from the music industry, historically it actually meant the process of preparing and transferring recorded audio from a source containing the final mix to a storage device (the master). The key thing about the master is that this was usually a magnetic tape that was the source from which all copies would be produced.
Today, the process of putting the finishing touches on a piece of audio is normally referred to as "mastering". In order to make the audio that you create sound professional, it requires "mastering". API.audio allows you to programatically master your audio without any expertise about the process.
It's worth emphasising that mastering is a skill. It requires critical listening, although there are software tools that exist to facilitate the process. Our proprietary mastering engine is built upon decades of audio mastering expertise in our team, user feedback and an understanding of some of the mastering software out there. We are constantly improving the engine and the more you use our system the better it will get! With simply a few lines of code, you can create high quality audio tracks.
Famous Mastering Engineers
If you want to look up some famous audio mastering engineers (and indeed there are some!) - you can have a look here
The mastering process
The mastering process is complicated and in fact there are books written on it.
Even if you do not know anything about audio, you might notice the following issues before the mastering process:
- Speech does not seem to integrate with other audio elements but stands out awkwardly.
- Volume level is inconsistent throughout your track
- Your track sounds small and disappointing when compared to a professional production (eg a radio ad)
And many others. API.audio allows you to take care of all of these with a few lines of code and lift your audio to professional levels.
What does Mastering allow you to do?
Mastering allows you to create and retrieve a mastered audio file that is ready to be played or broadcasted. A mastered version contains the speech of the script, a background track, personalised tracks for your audience, and a mastering process to enhance the audio quality of the whole track.
In order to get a mastered audio file, make sure you requested speech for your script resource first.
Request Mastering for Script
The Mastering request for a Script can contain three Parameters:
-
scriptId [Required] (string) - The script resource ID
-
soundTemplate *[Optional] (string) - The sound template name ID
-
audience (list) - List of dicts containing the personalisation parameters. This parameter depends on the number of parameters you used in your script resource. Imagine you created the following script with two Placeholders:
script = apiaudio.Script().create(
scriptText="<<sectionName::hello>> Hello {{username|buddy}} <<sectionName::goodbye>> Good bye from {{location|barcelona}}",
projectName="myProject",
moduleName="myModule",
scriptName="myScript",
scriptId="id-1234"
)
In the following example below we want to produce the script for username Antonio with location Barcelona and the sound template jakarta
response = apiaudio.Mastering().create(
scriptId="id-1234",
soundTemplate="jakarta",
audience=[{"username":"antonio", "location":"barcelona"}]
)
You will get a Response with Status code 200 if Mastering requested successfully and you will be able to download the produced file, with the specified Audience.
Download the File:
destination [optional] (string) - The folder destination path. Default is "." (current folder)
mastered_files = apiaudio.Mastering().download(
scriptId="id-1234",
parameters={"username":"antonio", "location":"barcelona"}
destination="."
)
Updated over 2 years ago