Skip to content

[FEATURE] startStream without saving data in browser #443

@CarlosFelicioPainkillers

Description

Is your feature request related to a problem? Please describe.
I’m always frustrated when using the recorder library with streams because the library automatically stores recorded audio data in the browser’s memory. This leads to high memory usage during long recording sessions, especially in browser environments where memory is limited. There is currently no way to disable this storage when working with streams, which causes performance issues and potential crashes for applications with extended audio recording functionality.

Describe the solution you'd like
I would like the library to implement a feature that allows disabling the automatic storage of audio data in the browser’s memory when using streams. For example, an option in the configuration like disableMemoryStorage: true would be ideal. When this option is enabled, the library should handle the stream as a pass-through, processing chunks in real-time without keeping them in memory.

Describe alternatives you've considered
As a workaround, I have tried manually clearing memory after recording by intercepting and processing the audio data, but this is cumbersome and does not fully solve the problem since the library continues to allocate memory during recording. Additionally, I considered switching to other libraries, but recorder provides unique features that are difficult to replicate elsewhere.

Additional context
Here is a snapshot from the browser’s memory analysis showing how JSArrayBufferData grows significantly during recording:
Screenshot 2024-11-26 at 14 29 16

This issue becomes critical for web applications with real-time audio streaming requirements. Adding the requested feature would make the library much more suitable for such use cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions