Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for outputting shards of recorded files without stopping the recording #241

Closed
willxie opened this issue Nov 14, 2023 · 1 comment

Comments

@willxie
Copy link

willxie commented Nov 14, 2023

Is your feature request related to a problem? Please describe.

Today, the recorder needs to be stopped before a file can be outputted. For a long recording, it's often infeasible to send over a large file over the net. I was hoping that incremental 1 minute compressed .mp3 can be generated for a long 30 minute recordings. So 30 .mp3s in total that can be incrementally sent to the server and let the server stitch them back together if needed.

I understand that there's a stream function for raw, uncompressed audio data. But these will be large in size without additional post processing. Ideally we can use the same library to generate these shards as if they were individually "stopped" recordings

Describe the solution you'd like
See above.

Describe alternatives you've considered
Use streamed data and do post processing like converting to .mp3 to shrink the size. However, they code will be messy for cross-platform support. The above suggested solution should be much simpler by just using the same encoder and implementation based on the platform.

@willxie willxie changed the title Support for outputting shards recorded files without stopping the recording? Support for outputting shards of recorded files without stopping the recording Nov 14, 2023
@llfbandit
Copy link
Owner

Unfortunately, there's no workaround that can be implemented in the package right now.
The only solution from this package is to use aac/adts but this is only available for Android at this time (and I don't how to achieve this on other platforms).
Otherwise, you can still shard the file before uploading it.
Streaming current recording can not be done because file is open with random access flag. So we can't be sure that data is right when polling it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants