How to Use Audio Presets to Make your Audio Sound Great!
Using Presets
The AudioStack API has a range of presets, which optimise your audio to sound good in different scenarios.
See the detailed guide to Presets for more information.
Example
In this example we're going to use mp3_high
which is a high quality mp3 format. And we're going to build an end to end example.
import audiostack
import os
audiostack.api_key = os.environ['AUDIOSTACK_API_KEY']
script = audiostack.Content.Script.create(
scriptText="""
<as:section name="intro" soundsegment="intro">
Hey there. Welcome to Audiostack - the audio creation platform that allows you to create high quality audio assets using just a few lines of code.
</as:section>
<as:section name="main" soundsegment="main">
Whether it's a podcast, a video, a game, or an app, Audiostack has you covered. You can create voiceovers, sound effects, music, and more.
</as:section>
<as:section name="outro" soundsegment="outro">
We are excited to see what you'll create with our product!
</as:section>
"""
)
tts = audiostack.Speech.TTS.create(
scriptItem=script, voice="isaac"
)
tts = audiostack.Speech.TTS.remove_padding(speechId=tts.speechId)
mix = audiostack.Production.Mix.create(
speechItem=tts,
soundTemplate="chill_vibes",
)
enc = audiostack.Delivery.Encoder.encode_mix(productionItem=mix, preset="mp3_high")
enc.download(fileName="example_mp3_high")
Next steps
You can experiment with other presets such as mp3
, wav
and mp3_alexa
- simply specify which preset you'd like to apply in line 32.
Updated 4 months ago