Better audio component to use for transcriptions

I built an app to make transcriptions with whisper using streamlit. There’s an editor to edit the transcriptions and the users can play an audio or a video file at the same time to edit them. Some users asked me if I could add some functionality to the audio playback so that they can see the time where they are moving to on the audio slider, like a tooltip and also if there’s an easy way to skip some seconds backwards or forwards with a single click or command. Does anyone know if there’s a better audio player to do that in streamlit?

Having tooltips is not currently possible, I guess it would make a good feature request. You can see the time if you drag the slider. You can also skip one second or five seconds using the keyboard, but only when the widget has the focus.

Except for the lack of tooltips, I think the behavior of st.audio is pretty standard. But if there is an audio player widget that you like more, it should be possible to make it work using the components API. It may be worth a try if you feel comfortable with JS.

Correction, apparently you can skip five seconds or one tenth of the total playing time.

Thanks for the suggestions! I think I will search for a widget and see if I can adapt it. They also ask for fast forward and backward.

Btw, they also asked if there’s a way to display the wavelength histogram of the audio to see where the pauses are. Do you know if you can do that in streamlit?

Well, “display the wavelength histogram” sounds to me like some doing some computations and a plot. So the answer is yes, I guess.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.