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

win11 Electron 使用时 powerlevel一直是0或者1 #242

Open
gaoqs opened this issue Aug 30, 2024 · 2 comments
Open

win11 Electron 使用时 powerlevel一直是0或者1 #242

gaoqs opened this issue Aug 30, 2024 · 2 comments

Comments

@gaoqs
Copy link

gaoqs commented Aug 30, 2024

win11 Electron里使用时 powerlevel一直是0或者1,浏览器里使用没有问题,win10里正常。开启或者关闭降噪都不起作用。可能是什么导致的,或者需要配置什么

@xiangyuecn
Copy link
Owner

xiangyuecn commented Aug 30, 2024

参考一下 #230 ,可能的原因是getUserMedia参数里面提供了sampleRate后,浏览器选择了一个没有声音的音频输入设备

去掉 trackSet[sampleRateTxt]=ctx[sampleRateTxt] 这个配置试试,可能是因为配置了sampleRate,同时设置 Recorder.ConnectEnableWebM=false 禁用掉MediaRecorder

trackSet[sampleRateTxt]=ctx[sampleRateTxt];//必须指明采样率,不然手机上MediaRecorder采样率16k
var mSet={audio:trackSet};
try{
var pro=Recorder.Scope[getUserMediaTxt](mSet,f1,f2);

@gaoqs
Copy link
Author

gaoqs commented Sep 2, 2024

还是一样,不起作用。之前忘记说了一点,录音的数据一直是有的,我们拿到这个数据可以实时转文字,就是声音大小(powerlevel)为0,声波图没啥波动

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