diff --git a/index.html b/index.html index d53d51bb..790efee6 100644 --- a/index.html +++ b/index.html @@ -284,7 +284,7 @@
Saved Records
?
- + Saved Records Context mode ? + title="When enabled, context mode adapts predictions by analyzing the surrounding context. +Not available in the BirdNET model">?
-
+
? + title="Ignore samples with just background noise. Value is the minimum signal strength to look at. +Not available in the BirdNET model">? @@ -400,9 +403,8 @@
Saved Records
- -
+
? @@ -617,7 +619,7 @@
Saved Records
?
+'Fade' adds a 1 second fade effect to the start and end of the audio">?
diff --git a/js/ui.js b/js/ui.js index 8d9b8d39..24f4baf3 100644 --- a/js/ui.js +++ b/js/ui.js @@ -1439,10 +1439,15 @@ window.onload = async () => { audioFade.disabled = !audioPadding.checked; audioDownmix.checked = config.audio.downmix; setNocmig(config.detect.nocmig); + //const chirpityOnly = document.querySelectorAll('.chirpity-only'); if (config.model !== 'v2.4'){ + // show chirpity-only features + //chirpityOnly.forEach(element => element.classList.remove('d-none')); contextAware.checked = config.detect.contextAware SNRSlider.disabled = false; } else { + // hide chirpity-only features + //chirpityOnly.forEach(element => element.classList.add('d-none')); contextAware.checked = false; contextAware.disabed = true; config.detect.contextAware = false; @@ -1457,6 +1462,8 @@ window.onload = async () => { if (config.backend === 'webgl') { SNRSlider.disabled = true; }; + + // Filters HPThreshold.textContent = config.filters.highPassFrequency + 'Hz'; HPSlider.value = config.filters.highPassFrequency; @@ -2235,13 +2242,18 @@ const loadModel = ({clearCache = true} = {}) => { const modelToUse = document.getElementById('model-to-use'); modelToUse.addEventListener('change', function (e) { config.model = e.target.value; + const chirpityOnly = document.querySelectorAll('.chirpity-only'); if (config.model === 'v2.4') { contextAware.checked = false; + // hide chirpity-only features + //chirpityOnly.forEach(element => element.classList.add('d-none')); contextAware.disabed = true; config.detect.contextAware = false; SNRSlider.disabled = true; config.filters.SNR = 0; } else { + // show chirpity-only features + //chirpityOnly.forEach(element => element.classList.remove('d-none')); contextAware.disabed = false; SNRSlider.disabled = false; } @@ -3972,6 +3984,7 @@ SNRSlider.addEventListener('change', handleSNRchange); const handleHPchange = () => { config.filters.highPassFrequency = HPSlider.valueAsNumber; + config.filters.active || toggleFilters(); updatePrefs(); worker.postMessage({ action: 'update-state', filters: { highPassFrequency: config.filters.highPassFrequency } }) showFilterEffect(); @@ -3988,6 +4001,7 @@ HPSlider.addEventListener('change', handleHPchange); // Low shelf threshold const handleLowShelfchange = () => { config.filters.lowShelfFrequency = LowShelfSlider.valueAsNumber; + config.filters.active || toggleFilters(); updatePrefs(); worker.postMessage({ action: 'update-state', filters: { lowShelfFrequency: config.filters.lowShelfFrequency } }) showFilterEffect(); @@ -4004,6 +4018,7 @@ LowShelfSlider.addEventListener('change', handleLowShelfchange); // Low shelf gain const handleAttenuationchange = () => { config.filters.lowShelfAttenuation = - lowShelfAttenuation.valueAsNumber; + config.filters.active = true; updatePrefs(); worker.postMessage({ action: 'update-state', filters: { lowShelfAttenuation: config.filters.lowShelfAttenuation } }) showFilterEffect();