Talestreamer is a cloud-based service that generates sound as output given an input document. Talestreamer’s output is optimized for Alexa, Google Assistant, and other voicebot ecosystems. Talestreamer input documents are XML. Let’s start with an example:
This input document tells Talestreamer to speak the words “Welcome to Talestreamer” in Talestreamer’s default voice (Amy from Amazon Polly). You can paste this document into the Talestreamer Composer and hit the play button to hear the response. You can also download the response and use it directly in your voicebot. Talestreamer reads this input document, calls Amazon Polly to synthesize speech, adjusts the response volume to work with voicebots, and converts Polly’s response a common voicebot audio format.
Talestreamer takes the grunt work out of this simple task. Taking the grunt work out of creating great sounding audio interfaces for voicebots is Talestreamer’s mission in life.
Let’s look at another way Talestreamer helps you make great sounding audio interfaces: by controlling the style of the response.
This input document speaks the same words as before, but in a different style, using the voice of Brian from Amazon Polly. Talestreamer documents separate what is presented (content description) from how it is presented (content styling), a foundational design approach on the web. TSML documents represent styling information, including what voice to use, using Talestreamer Stylesheets (TSSS) syntax in the
Talestreamer gives you access to all of the Amazon Polly voices and languages.
Talestreamer also helps you incorporate human voices and sound effects into your audio interface. Talestreamer can read MP3 audio from any URL, automatically adjust its volume to work with Alexa or Google Assistant, and convert it into their format.
Talestreamer helps you add background audio to your stream.
Talestreamer plays the background sound you specify until the foreground completes, and loops the background sound if it is shorter than the foreground sound.
You can combine all of these capabilities in a single response.
You can use TSML to add structure to your response, and then style different sections of the document differently using TSSS. When you do this, Talestreamer makes multiple requests to Amazon Polly, loads any audio resources you specified, normalizes volume, combines them all together, and converts the result to Alexa’s or Google Assistant’s audio format.
You can also separate style from content using stylesheets.
If you do use the
style style, you can then change your style independent of your content. For example, you could choose new background sound, or a new voice for your skill, without changing any of your code.
Talestreamer also supports the following advanced features:
- foreground and background volume
- trimming audio files
- Pitch and rate of synthesized voices
- Raw SSML support
For these topics and others, view our reference documentation.
When you can’t call Talestreamer in real time, an alternative is to store Talestreamer audio files in AWS S3 and reference them from your skill’s SSML. It’s fast, cheap, and easy to use S3-hosted files in Alexa skills and Google Assistant agents. To use this approach, do the one-time setup process now, and the audio upload process each time you want a new sound.
- Create an AWS Account
- Create an S3 bucket to store your Talestreamer files in. We’ll use talestreamer.example.com as our bucket name below.
- Compose and test the sound using Talestreamer Composer.
- Download the sound. By default, it will be called
- Rename the sound to your desired name, such as
- Upload the sound to your S3 bucket.
- Make sure you choose to make the file world-readable when you upload it.
- Use your sound from your skill or agent with the following snippet:
Our API is documented using OpenAPI and published on Swagger Hub. You can learn more or try it out there.
How do I use SSML with Talestreamer?
You can put an SSML
speak tag in any
Where can I get sounds that work with Talestreamer?