-
Notifications
You must be signed in to change notification settings - Fork 198
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
Saving file as it is streamed #60
Comments
Hi there, this is a nice idea but I don't know how I would generate meaning full header data (number of samples, etc) if all that could change in real-time. Is there a reason you can't stream to a vector of vectors and then save it to the audio file when needed? At the point of saving, the number of samples and other header data is known. |
The problem is that the streaming can go on for a long while which might make it not practical in terms of memory usage. Plus it is possible that the application terminates relatively suddenly where not having the last few frames might not be too bad but losing everything would be a big deal. |
I definitely understand the use-case. I think it is best handled outside of this library though - I intended this library as a tool for reading/writing audio files. I can see a useful |
I am working on a project in which data keeps streaming in and I need to save the frames to wav as they come in. I cannot wait until I have all the data to save and the sequence load_wav-add_samplesa-save_wav seems wasteful and I may lose frames.
Is there a better way to "flush" the frames to disk without having to close the file all the time?
The text was updated successfully, but these errors were encountered: