perf: 优化录制语音消息

This commit is contained in:
kuaifan 2024-11-19 18:39:52 +08:00
parent 0ec255ed60
commit a2ee1135dd
4 changed files with 8 additions and 2 deletions

View File

@ -895,7 +895,10 @@ export default {
type: "mp3",
bitRate: 64,
sampleRate: 32000,
audioTrackSet: null,
audioTrackSet: {
noiseSuppression: true,
echoCancellation: true,
},
disableEnvInFix: false,
onProcess: (buffers, powerLevel, duration, sampleRate, newBufferIdx, asyncEnd) => {
this.recordWave?.input(buffers[buffers.length - 1], powerLevel, sampleRate);
@ -909,6 +912,9 @@ export default {
if (window.Recorder.Support()) {
this.recordReady = true;
}
if (window.systemInfo.debug !== "yes") {
window.Recorder.CLog = function () { }
}
});
}
},

View File

0
resources/assets/statics/public/js/recorder/lib.fft.js vendored Normal file → Executable file
View File

2
resources/assets/statics/public/js/recorder/recorder.mp3.min.js vendored Normal file → Executable file

File diff suppressed because one or more lines are too long