feat: Implement sound normalization service and API endpoints

- Added SoundNormalizerService for normalizing audio files with support for one-pass and two-pass normalization methods.
- Introduced API endpoints for normalizing all sounds and specific sounds by ID, including support for force normalization and handling of already normalized sounds.
- Created comprehensive test suite for the sound normalizer service and its API endpoints, covering various scenarios including success, errors, and edge cases.
- Refactored sound scanning service to utilize SHA-256 for file hashing instead of MD5 for improved security.
- Enhanced logging and error handling throughout the sound normalization process.
This commit is contained in:
JSC
2025-07-28 09:18:18 +02:00
parent 36949a1f1c
commit 0fffce53b4
8 changed files with 2031 additions and 75 deletions

View File

@@ -47,5 +47,10 @@ class Settings(BaseSettings):
GITHUB_CLIENT_ID: str = ""
GITHUB_CLIENT_SECRET: str = ""
# Audio Normalization Configuration
NORMALIZED_AUDIO_FORMAT: str = "mp3"
NORMALIZED_AUDIO_BITRATE: str = "256k"
NORMALIZED_AUDIO_PASSES: int = 2 # 1 for one-pass, 2 for two-pass
settings = Settings()