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

Add audio decoding benchmarks #580

Merged
merged 4 commits into from
Mar 20, 2025

Conversation

NicolasHug
Copy link
Member

Example output:

~/dev/torchcodec (add-audio_benchmark*) » python benchmarks/decoders/benchmark_audio_decoders.py --path test/resources/nasa_13013.mp4.audio.mp3            
Benchmarking nasa_13013.mp4.audio.mp3, duration: 0:00:13, averaging over 30 runs:
torchcodec.AudioDecoder                  med = 4.49, mean = 4.76 +- 0.78, min = 4.28, max = 8.39 - in ms
torchaudio.load(backend='ffmpeg')        med = 5.01, mean = 5.15 +- 0.79, min = 4.51, max = 8.98 - in ms
torchaudio.load(backend='sox')           med = 7.21, mean = 7.54 +- 0.70, min = 7.00, max = 10.62 - in ms
torchaudio.StreamReader                  med = 7.34, mean = 7.76 +- 0.70, min = 7.23, max = 10.01 - in ms

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 20, 2025
@scotts
Copy link
Contributor

scotts commented Mar 20, 2025

I ❤️ benchmarks!

@NicolasHug NicolasHug merged commit 3b473a3 into pytorch:main Mar 20, 2025
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants