Start customizing voices and background music via the API
This section will guide will show you how to use Python to customize the generated audio with background music and different voices. For any details about the API, please refer to the API Reference.
This API is under rapid development. We are working hard to improve existing functionality and add missing functionality and as such might need to drop support for existing workflows. If you have any feature requests or concerns, please contact support@wondercraft.ai
If you would prefer to provide your own script, you can use the /podcast/scripted
endpoint instead. The payload for that request
looks slightly different. You will provide script segemnts, where each segment contains the text and the voice id for the
speaker.
Voice IDs can be copied from the Wondercraft platform:
This guide explains how to use the music_spec
field in the GenerateAiScriptedEpisodeRequest
to add
background music to podcast episodes.
The music_spec
field is an optional component of the requests to /podcast
and /podcast/scripted
that allows you to add a background music track to the generated podcast.
This field uses the MusicTrackSpec
model, which provides fine-grained control over the music playback.
Here’s an example of how to use the music_spec field:
music_id
(Required)
fade_in_ms
(Optional)
"fade_in_ms": 3000
fades in the music over the first 3 seconds.fade_out_ms
(Optional)
"fade_out_ms": 2000
fades out the music over the last 2 seconds.playback_start
(Optional)
"playback_start": 5000
starts the playback 5 seconds into the music track.playback_end
(Optional)
"playback_end": 30000
stops playback 30 seconds into the music track.volume
(Optional)
"volume": 0.01
- makes the volume of the music 1%Automatic Trimming: The music track is automatically trimmed to match the duration of the generated podcast episode. If the episode is shorter than the music track, playback stops at the episode’s end.
Music Placement: The music always starts at the beginning of the podcast and cannot be placed at other positions.
Dependencies: The music_spec field is optional. If omitted, no background music will be added.
Validation: Ensure the music_id is valid and that fade_in_ms, fade_out_ms, playback_start, and playback_end are within the bounds of the music track’s duration.
Example Full Request
This request:
Start customizing voices and background music via the API
This section will guide will show you how to use Python to customize the generated audio with background music and different voices. For any details about the API, please refer to the API Reference.
This API is under rapid development. We are working hard to improve existing functionality and add missing functionality and as such might need to drop support for existing workflows. If you have any feature requests or concerns, please contact support@wondercraft.ai
If you would prefer to provide your own script, you can use the /podcast/scripted
endpoint instead. The payload for that request
looks slightly different. You will provide script segemnts, where each segment contains the text and the voice id for the
speaker.
Voice IDs can be copied from the Wondercraft platform:
This guide explains how to use the music_spec
field in the GenerateAiScriptedEpisodeRequest
to add
background music to podcast episodes.
The music_spec
field is an optional component of the requests to /podcast
and /podcast/scripted
that allows you to add a background music track to the generated podcast.
This field uses the MusicTrackSpec
model, which provides fine-grained control over the music playback.
Here’s an example of how to use the music_spec field:
music_id
(Required)
fade_in_ms
(Optional)
"fade_in_ms": 3000
fades in the music over the first 3 seconds.fade_out_ms
(Optional)
"fade_out_ms": 2000
fades out the music over the last 2 seconds.playback_start
(Optional)
"playback_start": 5000
starts the playback 5 seconds into the music track.playback_end
(Optional)
"playback_end": 30000
stops playback 30 seconds into the music track.volume
(Optional)
"volume": 0.01
- makes the volume of the music 1%Automatic Trimming: The music track is automatically trimmed to match the duration of the generated podcast episode. If the episode is shorter than the music track, playback stops at the episode’s end.
Music Placement: The music always starts at the beginning of the podcast and cannot be placed at other positions.
Dependencies: The music_spec field is optional. If omitted, no background music will be added.
Validation: Ensure the music_id is valid and that fade_in_ms, fade_out_ms, playback_start, and playback_end are within the bounds of the music track’s duration.
Example Full Request
This request: