Broadcaster Audio Mixing
Palabra Broadcaster lets listeners hear a bit of the original audio while listening to the translated track. This creates a more natural, comfortable experience.
Audio Mixing Controls
By default, Broadcaster mixes the original track into every translated track. You can control the original track’s volume and ducking behavior.
When creating or updating a Broadcast Task, you can control three settings:
-
original_base_volume(number, 0..1): Base volume of the original track mixed under the translated track. Examples: 0 = off, 0.5 = 50%, 1 = same as the original. -
original_ducked_volume(number, 0..1): Volume of the original while the translated voice is speaking (ducked state). When translation is silent, playback usesoriginal_base_volume. Example: 0.2 keeps the original at 20% during translated speech so listeners can hear the translation clearly without interference. -
fade_factor(number, 0..1): Controls how quickly audio fades betweenoriginal_base_volumeandoriginal_ducked_volume. Lower values produce a smoother/longer fade; 1 makes the change instantaneous.
Note:
fade_factoris optional. In most cases, omit it to use the server default. Set it only if you need a custom fade speed.
Code example
curl -X POST 'https://api.palabra.ai/broadcasts' \
-H "ClientID: $API_CLIENT_ID" \
-H "ClientSecret: $API_CLIENT_SECRET" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "My Stream",
// ...
"original_base_volume": 1,
"original_ducked_volume": 0.2,
"fade_factor": 0.07,
// ...
}'
WebRTC Output Case
With WebRTC output, you can receive all translated tracks from the room, plus the original track.
Recommendation: set
original_base_volumeandoriginal_ducked_volumeto 0 to disable backend mixing of the original into translated tracks to decreise latency and increase quality. Instead, mix the original locally in your client using the original MediaStream track from the room.
Inportant: If both
original_base_volumeandoriginal_ducked_volumeare0, setfade_factorto1to avoid unintended crossfade artifacts or background noise.
WebRTC Output code example
curl -X POST 'https://api.palabra.ai/broadcasts' \
-H "ClientID: $API_CLIENT_ID" \
-H "ClientSecret: $API_CLIENT_SECRET" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"title": "My Stream",
// ...
"original_base_volume": 0,
"original_ducked_volume": 0,
"fade_factor": 1
//..
"outputs": [
{
"protocol": "webrtc_push",
"lang_codes": ["original", "fr", "de"]
}
]
}'