Best way to trim audio?

So I’m making a dashboard that lets you trim and annotate audio clips from a larger audio files.

So right now i have the audio clip that you can play on top thats controlled by the text inputs under the buttons. The inputs control the offset from the original clip. (In this screen shot i didn’t change the start time but added 900ms to the end)

Ideally what I would want to happen is something like a user presses play and watches it animate its way down the graph and to be able to trim it with the range slider to the desired clip.

I found this range slider with graph objects which visually looks nicer but having trouble getting the range-slider values and using the values to as Inputs to cut the audio. But i would still need a way to animate it as the sound is playing.

Any help and guidance is appreciated. Thanks

  • Cup

One idea would be to add editable shapes and use those as an input. See Image Annotations | Dash for Python Documentation | Plotly