Skip to content

Browser memory error for large audio files - files > 13 minutes #499

@aseem-heg

Description

@aseem-heg

Package version
6.0.0

Environment

  • OS: Windows
  • Browser Chrome

Describe the bug
When we record audio larger than 13 minutes on chrome browser - then click on stop which calls
final path = await record.stop();
We get this error shown below:

Image

A clear and concise description of what the bug is.
Its a memory error - browser is running out of memory.

final record = AudioRecorder();
await record.start(const RecordConfig(), path: 'aFullPath/myFile.m4a');
final path = await record.stop(); 

Does the stop() command save audio in browser memory or disk ?

Add your record configuration RecordConfig(...)
await _audioRecorder.start(
const RecordConfig(encoder: AudioEncoder.wav),
path: 'audio.$fileExtension',
);

To Reproduce
Record audio larger than 13 minutes.
It works fine for smaller audio.

Expected behavior
Browser should not crash.

A clear and concise description of what you expected to happen.
Is there a way to record large audios without causing memory error ?
I want to upload the audio to a bucket using resumable URL.
Is there any example on how to do this on github ?

I am also trying streaming - but I could not find complete example on streaming using this package on Github.
Looking for details like how to listen to the stream, How to stop the stream, How to get chunks from streaming , how to upload them to a resumable URL on gcs etc..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions