spotify / pedalboard

🎛 🔊 A Python library for audio.

Home Page:https://spotify.github.io/pedalboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Playing specific segment of audio

Dohg678 opened this issue · comments

Hello,
I was wondering if there was a way to play a specific segment of audio from a file (e.g. from 10s to 20s of an mp3 file)

Hi @Dohg678!

Pedalboard doesn’t currently have a mechanism to play back an audio buffer at all - there’s no play function or similar. As a workaround, you can load the section of audio you want to play with the AudioFile class (using seek and read), then play it with another library in Python (or simply write it to a file for later playback with another tool, like ffplay).