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

Advice on Creating WAV Header for Large File Multipart Upload #73

Open
jsonpoindexter opened this issue Feb 29, 2024 · 0 comments
Open

Comments

@jsonpoindexter
Copy link

Hello,

I'm working with the Hound library to implement uploading a large WAV file via multipart upload to a storage service. I've got everything working except for one key aspect: creating the WAV header.

Scenario: I'm concatenating several smaller WAV files (referred to as 'parts') into a larger file for upload. Given the final file's size can exceed 2GB, and aiming for memory efficiency, I plan to upload each part sequentially using a multipart upload API. The challenge arises with the WAV format's requirement for the 'data chunk size' in the header, as the total size isn't known upfront during the initial upload.

Hound offers an into_header_for_infinite_file method, which seems like a workaround. However, its documentation suggests it's more suited for streaming contexts, potentially leading to 'non-standard' WAV files.

Current Approach: With access to the total duration (in ms) of the intended final output, I've devised a custom create_wav_header method for the initial part's upload but remain open to more standard solutions.

Questions:

  • Has anyone faced a similar challenge and found a more standard solution within Hound or through another approach?
  • Are there implications of using the into_header_for_infinite_file method for non-streaming applications that I should be aware of?

Technical Context:

  • Rust version: 1.76.0
  • Hound version: 3.5.1

Appreciate any insights or advice on this matter. Thanks!

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

1 participant