When the waveform is large, spectrogram doesn't show (but the element will still play on double-click).

Data used:
Waveform had 38570094 samples. Over 44100 sample rate this corresponds to 14.5 minutes.
Need to handle more gracefully.
In python, we will choose default according to size, and raise meaningful error if spectrogram is asked for but too big wf.
But in JS, we need to handle more gracefully too (and possibly forward error message to python.
Code used:
def wfsr_js_obj(wf, sr=44100, chart_type='spectrogram', height=200, title='', **kwargs):
audio_channel = {
'chartType': chart_type,
'type': 'audio',
'buffer': wf,
'sr': sr
}
return single_time_vis(audio_channel,
bt=0,
tt=int(1e6) * len(wf) / sr,
height=height,
title=title,
**kwargs)
When the waveform is large, spectrogram doesn't show (but the element will still play on double-click).
Data used:
Waveform had 38570094 samples. Over 44100 sample rate this corresponds to 14.5 minutes.
Need to handle more gracefully.
In python, we will choose default according to size, and raise meaningful error if spectrogram is asked for but too big wf.
But in JS, we need to handle more gracefully too (and possibly forward error message to python.
Code used: