Python audio transitions for queues, bots, and streamers

Veloura Audio

A reusable audio engine for equal-power crossfades, beat-aware planning, AutoMix-style transitions, and Discord-independent PCM playback.

Queue Playback

Use PCMQueuePlayer for apps that need frame reads, snapshots, skips, and queue control outside Discord.

Smart Transitions

Trim silence, normalize loudness, and adapt crossfade timing to track duration and analysis results.

AutoMix Planning

Plan adjacent-track transitions with beat confidence, conservative tempo nudging, and safe fallback behavior.

Small core, optional integrations.

Install only the engine by default. Add stream resolution or Discord voice support when your product needs it.

pip install veloura-audio
pip install "veloura-audio[stream]"
pip install "veloura-audio[discord]"

Build playback without inheriting a Discord bot shape.

The player facade keeps app code clear: enqueue prepared tracks, read PCM frames, inspect snapshots, and prepare the next transition when both tracks are known.

from veloura.audio import AudioTrack, PCMQueuePlayer, transition_preset

config = transition_preset("automix")
player = PCMQueuePlayer(
    volume=0.65,
    crossfade_seconds=config.base_crossfade_seconds,
)

track = AudioTrack.from_source(
    "song-a.mp3",
    title="Song A",
    duration=180,
)

player.enqueue(track)
frame = player.read_frame()
snapshot = player.snapshot().to_dict()
from veloura.audio import prepare_automix_transition_pair

plan = prepare_automix_transition_pair(
    current_track,
    next_track,
    transition_preset("automix"),
)

session.source.enqueue(next_track)

Pair-aware transitions with conservative fallbacks.

AutoMix analyzes current outro and next intro beat windows, then applies a pair-specific crossfade, intro trim, and small tempo nudge when confidence is high. If analysis is weak, it keeps the blend short.

Listen to a rendered ending transition.

This clip uses two CC0 music excerpts and was rendered with Veloura's PCMQueuePlayer. It is bundled as a small listenable example of the crossfade engine.

Veloura CC0 Music Transition

Two public-domain-style music excerpts blended with an equal-power ending transition.

CC0 music sources, credited clearly.

The public demo is rendered from OpenGameArt tracks listed as CC0. Attribution is optional under CC0, but the sources are shown here for provenance.

Empacotatron

By Fupi. Listed as CC0 on OpenGameArt. View source.

Rhythm Garden

By congusbongus. Listed as CC0 on OpenGameArt. View source.

python examples/generate_transition_demo_audio.py

One engine, several product surfaces.

Discord Music Bots

Keep CrossfadeAudioSource as the Discord voice adapter while the package handles transition planning.

Radio Streams

Run prepared queues through PCM frame output for continuous livestream or station-style playback.

Music Apps

Use PCMQueuePlayer as the audio engine behind desktop, web, or mobile-style queue products.