Use explicit no-audio message for mic calibration
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// Maintainer-controlled web client version.
|
// Maintainer-controlled web client version.
|
||||||
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
||||||
window.CHGRID_WEB_VERSION = "2026.02.22 R148";
|
window.CHGRID_WEB_VERSION = "2026.02.22 R149";
|
||||||
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
||||||
window.CHGRID_TIME_ZONE = "America/Detroit";
|
window.CHGRID_TIME_ZONE = "America/Detroit";
|
||||||
|
|||||||
@@ -1071,7 +1071,7 @@ async function calibrateMicInputGain(): Promise<void> {
|
|||||||
|
|
||||||
const activeRms = rmsValues.filter((value) => value >= MIC_CALIBRATION_ACTIVE_RMS_THRESHOLD);
|
const activeRms = rmsValues.filter((value) => value >= MIC_CALIBRATION_ACTIVE_RMS_THRESHOLD);
|
||||||
if (activeRms.length < 10) {
|
if (activeRms.length < 10) {
|
||||||
updateStatus('Calibration failed. Speak continuously and try again.');
|
updateStatus('No audio detected, please try again.');
|
||||||
audio.sfxUiCancel();
|
audio.sfxUiCancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1080,7 +1080,7 @@ async function calibrateMicInputGain(): Promise<void> {
|
|||||||
const percentileIndex = Math.min(activeRms.length - 1, Math.floor(activeRms.length * 0.9));
|
const percentileIndex = Math.min(activeRms.length - 1, Math.floor(activeRms.length * 0.9));
|
||||||
const observedRms = activeRms[percentileIndex];
|
const observedRms = activeRms[percentileIndex];
|
||||||
if (!(observedRms > 0)) {
|
if (!(observedRms > 0)) {
|
||||||
updateStatus('Calibration failed. Speak continuously and try again.');
|
updateStatus('No audio detected, please try again.');
|
||||||
audio.sfxUiCancel();
|
audio.sfxUiCancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user