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

use constants instead of hard-coded values in audio-maintainer and http-external-event-handler #7586

Conversation

skrashevich
Copy link
Contributor

No description provided.

@netlify
Copy link

netlify bot commented Aug 27, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 7b40390
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/64eaa4939077af00084fc7c0

@skrashevich skrashevich force-pushed the 230827-codeqa-audio-events-constants branch from 4ddab82 to 7b40390 Compare August 27, 2023 01:19
@@ -199,7 +199,7 @@ def detect_audio(self, audio) -> None:
continue

if score > dict((self.config.audio.filters or {}).get(label, {})).get(
"threshold", 0.8
"threshold", AUDIO_MIN_CONFIDENCE
Copy link
Sponsor Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, 0.8 is the default min confidence for a filter, not 0.5 which is the min confidence for any audio detection

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class AudioFilterConfig(FrigateBaseModel):
    threshold: float = Field(
        default=0.8,
        ge=AUDIO_MIN_CONFIDENCE,
        lt=1.0,
        title="Minimum detection confidence threshold for audio to be counted.",
    )

0.5<0.8

Copy link
Sponsor Collaborator

@NickM-27 NickM-27 Aug 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.5<0.8

Yes exactly, which is why this is incorrect. Not only does it not match the docs / default config, it is being more permissive than the default that has been set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. I'll re-check this

@github-actions github-actions bot added the stale label Sep 27, 2023
@github-actions github-actions bot closed this Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants