Overview

Content is any raw file or input that you would use to create an audio asset. This could include text, such as scripts, or audio recordings.

Script

The most commonly used type of content in the AudioStack API is scripts. A script is an individual piece of content which normally would be spoken and recorded by a voice. While you can create Speech directly from text via a direct call to the text-to-speech API or you can only use the rendering engine in isolation, it usually makes sense to create a script and generate speech or fully produced audio based on that.

Scripts can be organised further into modules and projects, which are the base to efficiently mass version and produce audio.

Why create scripts?

While you can create Speech directly from text via a direct call to the text-to-speech API or you can only use the rendering engine in isolation, it usually makes sense to create a script and generate speech or fully produced audio based on that. AudioStack offer ways for you to organize content efficiently, version it (eg for personalization or to make it dynamic) and arrange it so it's ready for production.

Scripts allow you to organize and store your content, offering additional guard rails optimised to programmatically create professional sounding audio such as SSML tags, personalisation parameters and sound design annotation.

If you use personalization parameters, you can simply reproduce speech by passing the chosen variable for a script already created. This reduces latency, makes it possible to switch speakers within the same track and access batteries-included parameters to personalize content or make it dynamic.

See here for Script Syntax guide

Code example

Let's look at an example showcasing a bunch of features. Not all the parameters added there are mandatory. For a complete list check the Script API reference list.

script = audiostack.Content.Script.create(
        scriptName="concert-ad",
        scriptText="Head over to buytickets.com to grab your tickets before they sell out!",
        projectName="band_tour",
        moduleName="winter_campaign"
)

Other Content Types

Audio Files

Audio files are also a very common type of content handled by the API. Find out more about Files here.

Video Files

While we don't yet support video files as content in AudioStack API, we are aware that many users will want to use video as source material for projects. Watch this space πŸ‘€