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

librosa采样率设置问题 #25

Open
meng-alt opened this issue Mar 16, 2023 · 1 comment
Open

librosa采样率设置问题 #25

meng-alt opened this issue Mar 16, 2023 · 1 comment

Comments

@meng-alt
Copy link

音频的采样率是8000,在使用librosa提取特征时,设置JSON文件的sample_rate为8000,出现如下报错:
librosa util exceptions ParameterError Wavelet basis with max frequency 4072.326421193822 would exceed the number of frequency bins
但是sample_rate设置为16000时,结果运行正常
请问出现这种问题的原因是什么;如果设置为8000,如何使其成功运行呢;采样率设置16000,特征提取的信息会不会存在误差;
期待作者大大的回答!

@Columbine21
Copy link

Columbine21 commented Jun 12, 2023

您好,首先采样率越高(每秒采样的样本数),误差越小。将采样率设置为 8000 反而会导致更大的误差。

关于您的报错可以看看是不是能用这个解决:
https://stackoverflow.com/questions/43838718/how-can-i-extract-cqt-from-audio-with-sampling-rate-8000hz-librosa

目前情感分析等问题中音频默认(通用的)采样率都是16k。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants