-
Notifications
You must be signed in to change notification settings - Fork 68
Add AudioDecoder docs and tutorial #582
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
Conversation
|
|
||
| duration_seconds = samples.data.shape[1] / samples.sample_rate | ||
| print(f"Duration = {int(duration_seconds // 60)}m{int(duration_seconds % 60)}s.") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I'm writing this, I feel like we should just set the duration_seconds field ourselves and make it part of AudioSamples? It's not like memory is a problem, and it would be consistent with video frames.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it would be useful. I was wondering the same thing when reading the tutorial.
This PR adds most docs for audio decoding, but more will come (like the metadata rendering stuff). This PR needs both #584 and #586 to be merged first.
Docs currently look like this: