Create your first fully produced audio asset in a few minutes
In this tutorial, you'll produce an audio asset (like an mp3) using Python.
Before you start
- register to our Console to get a free API key
- Install the latest python SDK using
pip install -U audiostack
Your first audio asset
Let's create your first audio asset by using our audio production capabilities.
import audiostack import os """ Hello! Welcome to the audiostack python SDK. """ # make sure you change this to be your api key, or export it as AUDIO_STACK_DEV_KEY="<key>" audiostack.api_key = APIKEY print("In Content you can create scripts and manage your production assets.") scriptText = """ Welcome to AudioStack, the world's most powerful AI audio creation infrastructure. The unlimited possibilities of generative AI at your fingertips. In one single API." """ script = audiostack.Content.Script.create( scriptText=scriptText, projectName="testingthings" ) print(script) print("In Speech you can access almost a thousand AI voice models or your own, cloned voice.") tts = audiostack.Speech.TTS.create( scriptItem=script, voice="sara") print("In Production you can dynamically mix it with a sound design of your choice and master it so it sounds great.") mix = audiostack.Production.Mix.create( speechItem=tts, soundTemplate="cityechoes", masteringPreset="balanced" ) print(mix) print("In Delivery, we produce a great sounding file and deliver it where you need it.") encoder = audiostack.Delivery.Encoder.encode_mix(productionItem=mix, preset="mp3") encoder.download(fileName="myFirstAudioStackTrack")
Errors on authentication?
You'll get an error if your API Key is incorrect. Check your bashrc file or your environment settings if you're having trouble solving this.
Now you can listen to your audio asset called first_mix. Have some fun!
Great job! Want some goodie?
Share your audio asset on social media with one of our tags @aflorithmic #apiaudio, and get a Hacker plan for free for one month!
Updated about 1 month ago