times = librosa.frames_to_time(np.arange(len(rms)))
fig, ax = plt.subplots()
ax.plot(times, rms)
ax.axhline(0.02, color="r", alpha=0.5)
ax.set(xlabel="Time", ylabel="RMS");
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// The red line at 0.02 indicates a reasonable threshold for silence detection.