The code you posted reinitialises the hidden state for every frame. This basically means that the model is run for each frame independently. In other words the LSTM has no access to any data from previous frames.
Your code creates feature vectors for each frame, and then for each frame independently, feeds the features into an LSTM one at a time.
Why not just feed the LSTM one huge feature vector for each frame as a single timestep?