AudioStack allows you to choose from a variety of sound templates, which will then be mixed and mastered along with a speech track.

Let me listen to how it sounds!

import os
import audiostack

audiostack.api_key = os.getenv("API_KEY")

text = """
Testing Some great voices with some background music

# Listen and share your audio file
VOICE = "renata"
  script = audiostack.Content.Script.create(scriptText=text,
  scriptId = script.scriptId
  item = audiostack.Speech.TTS.create(scriptItem=script, voice=VOICE)
  # simple syntax, get TTS and then download

  item = audiostack.Speech.TTS.get(item.speechId)

  mix = audiostack.Production.Mix.create(speechItem=item,

  encoder = audiostack.Delivery.Encoder.encode_mix(productionItem=mix,
except Exception as e:

print("Cost for this session: ", audiostack.credits_used_in_this_session())

In this example we've added a masteringPreset (which adjusts the sound of the audio), we use Production.Mix to create the mix. This is mixing together elements. You'll notice that our elements consist of speech, a masteringPreset, a soundTemplate (which is the background to your audio), and we also specify forceLength which is great for adding to video content.

Afterwards we use the encoder to make the audio work for delivery, in this example we've passed in out mix and a preset (preset lets you specify mp3 or wav for example.

What is mastering

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.


  • Sound design - Sound design automation makes sure that the music layer will always fit perfectly to the speech layer of your audio, regardless of the length.
  • Sound Discoverability - AudioStack's sound design library offers a selection of different sounds covering a range of common themes or use cases. Filter to find the perfect template for your use case. Choose from our library of sound templates and mix and master it along with your speech track to create beautiful audio programmatically in a matter of seconds.
  • Time and length alignment - Set the length of each section of your audio to end at a specific time. For example you might want your ad to be exactly 30 seconds long or you might want your audio to fit to specific transitions in your video.

What’s Next