Peter had a great idea.
Huge efficiency breakthrough- compute wavdata outside of any flask routine at the top of python code with global variables. This saves a huge amount of time when loading as the processing is done as soon as the app is served, not when the user is pulling a webpage.