首页 > 解决方案 > RecordRTC.js : Duplicate Frame and Frame Drop when timeSlice is 100 and send data to WebSocket

问题描述

RecordRTC v5.6.1 we are using the below configuration and send realtime audio data on web socket but we are facing duplicate frames and some frames are dropped in the final output

   var options = { 
             mimeType: 'audio/wav',
            type: 'audio',
            checkForInactiveTracks: true,
            numberOfAudioChannels: 1,
            timeSlice: 100,
            noWorker: true,
            recorderType: StereoAudioRecorder,
            ondataavailable: function (e) {
                socketSend(e);
            }
        };
        recorder = new RecordRTC(stream, options);

If we set desiredSampRate to 16000, the issue reproduces rate is increased.

Please find attached sample audio output for Frame Drop and Duplicate Frame Frame_Drop_Duplicate.zip

Can you please suggest how we can capture 16k mono data and send to WebSocket without a frame drop and duplicate frame

标签: audiowebsocketaudio-recordingreal-time-datarecordrtc

解决方案


推荐阅读