no speech fixes

This commit is contained in:
techartdev
2026-02-20 20:47:44 +02:00
parent 0227a68001
commit 58df9f352f
5 changed files with 19 additions and 5 deletions
@@ -13,7 +13,7 @@
* + subscribes to openclaw_message_received events.
*/
const CARD_VERSION = "0.2.8";
const CARD_VERSION = "0.2.9";
// Max time (ms) to show the thinking indicator before falling back to an error
const THINKING_TIMEOUT_MS = 120_000;
@@ -611,6 +611,13 @@ class OpenClawChatCard extends HTMLElement {
console.debug("OpenClaw: Speech recognition aborted");
return;
}
if (err === "no-speech") {
this._voiceStatus = this._isVoiceMode
? "Listening… (no speech detected yet)"
: "No speech detected. Tap mic and try again.";
this._render();
return;
}
if (err === "network") {
console.warn("OpenClaw: Speech recognition network error");
} else {
@@ -642,7 +649,7 @@ class OpenClawChatCard extends HTMLElement {
this._voiceStatus = `Voice error: ${err}`;
}
if (["network", "audio-capture", "no-speech"].includes(err) && !this._voiceBackendBlocked) {
if (["network", "audio-capture"].includes(err) && !this._voiceBackendBlocked) {
this._scheduleVoiceRetry();
}
this._render();