audio-recorder-polyfill icon indicating copy to clipboard operation
audio-recorder-polyfill copied to clipboard

MP3 encoder seems to record at ~90% normal speed?

Open GreatTA1998 opened this issue 5 years ago • 3 comments

I use the polyfill for explain.mit.edu, which syncs the audio to blackboard visuals.

However, I noticed that when I switched from the WAV encoder to the MP3 encoder, my voice becomes deeper and slower, and the visuals gets more and more ahead of the audio (1 second ahead after 10 seconds, 2 seconds ahead after 20 seconds, etc.). My hypothesis is that the MP3 encoder records at maybe 90% normal speed because the MP3 recorder has a non-trivial encoding process.

A personal workaround is to slow down my app's internal timer to match that of the slowed MP3 audio. However, I prefer the following solutions (but don't know how):

  1. Find a way to do read the MediaRecorder's current timestamp, and let the audio be the source of truth for timestamp. Is this possible?
  2. Verify with you all that the MP3 does record in at a slowed rate, and wait til the fix. Is this on your roadmap?

Thanks for reading and appreciate any help.

GreatTA1998 avatar Jul 09 '20 06:07 GreatTA1998

Right now I spend all my time releasing PostCSS 8. Sorry, I accepts only PR for MP3 encoder.

You can try to fix the issue and send PR. I will release it ASAP.

ai avatar Jul 09 '20 06:07 ai

Understandable! Do you know of a way to read the MediaRecorder's current timestamp, or is this completely impossible.

GreatTA1998 avatar Jul 10 '20 10:07 GreatTA1998

@GreatTA1998 were you able to fix this issue?

deflexable avatar Jul 21 '23 04:07 deflexable