Skip to content

Conversation

wangsrGit119
Copy link
Contributor

Add audio file detection by magic numbers

Add audio file detection by magic numbers

Changes

  • Add is_audio_file() function to detect audio files by checking file headers
  • Support WAV, FLAC, MP3, M4A/AAC formats
  • Replace extension-based detection with content-based detection in read_and_config_file()

Why

More reliable audio file detection without relying on file extensions

Test

  • Tested with various audio formats (WAV, MP3)

 Add audio file detection by magic numbers
# Add audio file detection by magic numbers

## Changes
- Add `is_audio_file()` function to detect audio files by checking file headers
- Support WAV, FLAC, MP3, M4A/AAC formats
- Replace extension-based detection with content-based detection in `read_and_config_file()`

## Why
More reliable audio file detection without relying on file extensions

## Test
- Tested with various audio formats (WAV, MP3)
@zexupan
Copy link
Collaborator

zexupan commented Dec 11, 2024

Can you please test all formats? Thank you!

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

Successfully merging this pull request may close these issues.

2 participants