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

采样率不起作用? #37

Closed
mebtte opened this issue Jul 20, 2019 · 1 comment
Closed

采样率不起作用? #37

mebtte opened this issue Jul 20, 2019 · 1 comment

Comments

@mebtte
Copy link

mebtte commented Jul 20, 2019

const recorder = new Recorder({ type: 'wav', sampleRate: 16000 });

设置采样率无效
image
依旧是浏览器默认的44100

@xiangyuecn
Copy link
Owner

xiangyuecn commented Jul 20, 2019

图片中拿到的AudioBuffer是目测是你自己设置或者默认的吧(这个对象好像是解码出来的,差点被误导了😅) 音频源的原始数据,是浏览器的采样率是多少,它的采样率就是多少

配置的采样率会在最终编码时生效,最终结果wav格式的采样率其实是可以通过文件大小计算出来的:65430/2/2.043=16013≈16000

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