Relax resource requirements for audio analysis providers#4249
Merged
Conversation
The CPU/RAM gates added in #4198 for Smart Fades and Sonic Analysis were too strict and blocked capable hosts (e.g. a 6GB/2-core HAOS VM). Lower the minimum to 4GB RAM + 2 CPU cores and show an informational notice with the recommended hardware (6GB+ RAM, 4 cores) when the host is below that.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR relaxes the hardware gating for the Smart Fades and Sonic Analysis audio analysis providers and adds a “recommended hardware” informational alert so lower-spec but capable systems can still opt in while being warned about resource impact.
Changes:
- Lower minimum requirements for Smart Fades and Sonic Analysis to 4GB RAM / 2 CPU cores (AVX2 still required on x86 for ML inference).
- Add a non-blocking “resource warning”
ALERTconfig entry to both providers, shown only when the host is below the recommended 6GB+ / 4 cores threshold. - Refactor the RAM/CPU checks into a shared
_resource_shortfallhelper and add a non-raisingsystem_meets_requirementspredicate; add unit tests for the new predicate and update English translations.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/core/test_helpers.py | Adds coverage for the new non-raising system_meets_requirements predicate. |
| music_assistant/translations/en.json | Updates English translation keys/messages for the new resource warning alerts. |
| music_assistant/providers/sonic_analysis/strings.json | Adds the new resource_warning translation string for Sonic Analysis. |
| music_assistant/providers/sonic_analysis/init.py | Lowers gating thresholds and adds a recommended-hardware alert entry in config UI. |
| music_assistant/providers/smart_fades/strings.json | Replaces the old single-core warning with a new resource warning string. |
| music_assistant/providers/smart_fades/init.py | Lowers gating CPU threshold and adds a recommended-hardware alert entry in config UI. |
| music_assistant/helpers/util.py | Introduces _resource_shortfall + system_meets_requirements and reuses it in the raising gate. |
17 tasks
marcelveldt
added a commit
that referenced
this pull request
Jun 16, 2026
This was referenced Jun 16, 2026
marcelveldt
added a commit
that referenced
this pull request
Jun 17, 2026
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix?
The CPU/RAM gates added in #4198 for the Smart Fades and Sonic Analysis providers turned out to be too strict, blocking hosts that can comfortably run them (for example a 6GB / 2-core HAOS VM on an N100). This relaxes the hard minimum and replaces the strict-only gate with a clearer "recommended hardware" notice, so capable-but-modest systems can opt in while still being informed about the resource cost.
strings.jsonfor translation._resource_shortfallhelper so the check logic lives in one place.Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.