Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
Blob size is not equal to MediaRecorder's sample rate

I use MediaRecorder to record audio from web browser and send it to the server via socket.io:

    var recorder;
    navigator.mediaDevices.getUserMedia({ audio: true video: false }).then(
        (stream) => {
            recorder = new MediaRecorder(stream, { mimeType: "audio/webm" });
            recorder.ondataavailable = function(event) {
                console.log(event.data) // Blob {size: 6478, type: 'audio/webm;codecs=opus'}
                // blob size is 6478, but should be 48000
            }
        }
    );
    recorder.start(1000);

I set time slice of recording to 1000ms: recorder.start(1000); The device sample rate is 48000Hz. So every 1s I must send 48000 samples to the server. But as I see, there are just ~6000 samples every second. Could you please help with this problem and how to resolve it?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!