Skip to content

Commit

Permalink
Do not track option
Browse files Browse the repository at this point in the history
Better event handling
Full list of non-avian species
  • Loading branch information
Mattk70 committed Feb 12, 2024
1 parent eda1c20 commit a5abde2
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 142 deletions.
35 changes: 22 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ <h5>Saved Records</h5>
</span>
</div>
</div>

</div>
</div>
<div class="m-2"></div>
<div class="form-group rounded p-2 mb-2 bg-light">
Expand Down Expand Up @@ -510,9 +510,9 @@ <h5>Saved Records</h5>
<div class="col pe-0">
<div class="me-auto">
<div class="form-group rounded p-2 mb-2 bg-light">
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Gain" data-bs-content="Adjust the volume of audio to compensate for low recording levels.">?</a>
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Volume Adjustment" data-bs-content="Adjust the volume of audio to compensate for low recording levels.">?</a>
<label for="gain" class="form-label">
Gain Adjustment:
Volume Adjustment:
</label>
<div class="input-group me-0 p-0">
<input type="range" class="form-control-range w-75" min="0" max="50" id="gain">
Expand Down Expand Up @@ -549,7 +549,7 @@ <h5>Saved Records</h5>
</div>
</div>
</div>

</div>
</fieldset>
<fieldset class="border rounded m-2 p-1">
<legend style="font-size: large">Spectrogram Preferences</legend>
Expand Down Expand Up @@ -598,7 +598,7 @@ <h5>Saved Records</h5>
</fieldset>
<fieldset class="border rounded m-2 p-1 pb-3 bg-warning">
<legend class="pb-2" style="font-size: large"><span
class="material-symbols-outlined align-middle">science</span> Advanced features <a class="circle" style="background-color:darkgoldenrod" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Species Threshold" data-bs-content="The settings in this section can impact prediction quailty - for better or worse. Use them with caution!">?</a>
class="material-symbols-outlined align-middle">science</span> Advanced features <a class="circle" style="background-color:darkgoldenrod" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Advanced Features" data-bs-content="The settings in this section can impact prediction quailty - for better or worse. Use them with caution!">?</a>
</legend>
<div class="row">
<div class="col">
Expand All @@ -615,7 +615,7 @@ <h5>Saved Records</h5>
</div>
<div class="chirpity-only me-auto">
<div class="form-group rounded p-2 mb-2 bg-light">
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Signal to Noise Ration" data-bs-content="Skip over portions of audio with just background noise. Higher values skip increasingly noisy segments.
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Signal to Noise Ratio" data-bs-content="Skip over portions of audio with just background noise. Higher values skip increasingly noisy segments.
Not available in the BirdNET model">?</a>
<label for="snrValue" class="form-label">
SNR filter:
Expand Down Expand Up @@ -674,19 +674,28 @@ <h5>Saved Records</h5>
</div>
</div>
</fieldset>
<div class="row p-2 pe-2">
<div class="col me-0">
<div class="form-group rounded p-2 mb-2 text-bg-danger">
<a class="circle" style="background-color:darkred" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Species Threshold" data-bs-content="Enter debug mode (changes to this setting require a Chirpity relaunch to take effect)">?</a>

<div class="row p-2 m-2">
<div class=" col-auto form-group rounded p-2 mb-2 text-bg-light">
<div class="text-nowrap">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
role="switch" id="debug-mode">
<label class="form-check-label" for="debug-mode">Debug mode</label>
<label class="form-check-label me-2" for="debug-mode">Debug mode</label><a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Debug Mode" data-bs-content="Enter debug mode (changes to this setting require a Chirpity relaunch to take effect)">?</a>
</div>

</div>
</div>
</div>
<div class="col-auto form-group rounded p-2 mb-2 text-bg-light">
<div class="text-nowrap">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
role="switch" id="do-not-track">
<label class="form-check-label me-2" for="do-not-track">Opt out of usage analytics</label><a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Disable Tracking" data-bs-content="Chirpity collects anonymous system data to enhance user experience and aid bug tracking. If you do not want to share this information, you can disable it here.">?</a>
</div>
</div>
</div>
</div>

</form>
</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions js/BirdNet2.4.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,9 @@ class Model {
const finalPrediction = newPrediction || prediction;

const { indices, values } = tf.topk(finalPrediction, 5, true);
const topIndices = await indices.array();
const topIndices = indices.arraySync();
indices.dispose();
const topValues = await values.array();
const topValues = values.arraySync();
values.dispose();
// end new
// const array_of_predictions = finalPrediction.arraySync()
Expand Down
Loading

0 comments on commit a5abde2

Please sign in to comment.