'How can I extract Teager energy Opeator (TEO) features from a speech signal?

Currently I am trying to build a Speech Emotion Recognition system. One of the steps is extracting speech features. The feature that I am trying to extract is called Teager Energy operator (TEO) or nonlinear energy Operator. So, I would like to know if anyone knows the best way to extract TEO features from a speech signal. Here is one method I found which is using a library called teager_py. But,

When I enter this code:

from teager_py import Teager
TEO=[]

samples, sample_rate = librosa.load(male_df.Path[0],res_type='kaiser_fast',duration=input_duration,sr=22050*2)
TEO.append(Teager(samples,'horizontal',1))

It will show this error message:

Exception: Each row in your teager array must be of equal length.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source