Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed is slow, am I miss something? #18

Open
fire717 opened this issue Apr 4, 2023 · 5 comments
Open

Speed is slow, am I miss something? #18

fire717 opened this issue Apr 4, 2023 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@fire717
Copy link

fire717 commented Apr 4, 2023

install:
pip install audioflux

os:
ubuntu18
python3.8

@fire717
Copy link
Author

fire717 commented Apr 4, 2023

tried unintsll audioflux and reinstall through conda, met same error

@liufeigit liufeigit added the bug Something isn't working label Apr 4, 2023
@liufeigit
Copy link
Member

Thanks for the feedback, the online pip is compiled based on ubuntu20, and we will fix this bug for ubuntu 18 later.

Now, you can try to install from source:
https://github.com/libAudioFlux/audioFlux/blob/master/docs/installing.md#building-from-source

@fire717
Copy link
Author

fire717 commented Apr 6, 2023

Thanks for the feedback, the online pip is compiled based on ubuntu20, and we will fix this bug for ubuntu 18 later.

Now, you can try to install from source: https://github.com/libAudioFlux/audioFlux/blob/master/docs/installing.md#building-from-source

Thx, and I can use it by installing from source now. But I found the speed is slow, am I miss something?

My test code:

sig, sr = librosa.load(sample_path,sr=None)
mel = librosa.feature.melspectrogram(y=audio, sr=sample_rate)

sig, sr =torchaudio.load(sample_path)
mel = torchaudio.transforms.MelSpectrogram(sr, n_fft=2048, 
        hop_length=512, 
        n_mels=128,
        pad_mode='constant')
mel = torchaudio.transforms.AmplitudeToDB(top_db=None)(mel)


sig, sr = af.read(sample_path)
mel, mel_fre_band_arr = af.mel_spectrogram(sig, num=128, samplate=sr)#radix2_exp=12, 
mel = np.abs(mel)

And my result:

load time cost:

librosa:             0.017s      len(sig)=1459513   sr=32000
torchaudio:      0.021s      len(sig)=1459513   sr=32000
audioflux:         0.017s      len(sig)=1459513   sr=32000

to mel time cost:

librosa:             0.041s       output shape=[128,2851]
torchaudio:      0.011s       output shape=[128,2851]
audioflux:         0.066s       output shape=[128,1422]

@liufeigit liufeigit changed the title OSError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/yw/miniconda3/lib/python3.8/site-packages/audioflux/lib/libaudioflux.so) Import error for Ubuntu 18 Apr 19, 2023
@wtq2255
Copy link
Member

wtq2255 commented Apr 23, 2023

@fire717 Thanks for your test feedback, it revealed some performance issues with our project. This is mainly reflected in the feature extraction of long audio, for which we released latest version.
You can check out this benchmark. At the same time, you can also check the test script to see if there are any problems.

@liufeigit liufeigit added the good first issue Good for newcomers label Apr 23, 2023
@liufeigit
Copy link
Member

liufeigit commented Apr 23, 2023

https://github.com/libAudioFlux/audioFlux/tree/master/benchmark

Here are the new detailed performance benchmark data and test scripts. Thanks feedback.

@liufeigit liufeigit changed the title Import error for Ubuntu 18 Speed is slow, am I miss something? Apr 24, 2023
@liufeigit liufeigit pinned this issue Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants