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
+7
View File
@@ -2,6 +2,13 @@
All notable changes to the OpenClaw Home Assistant Integration will be documented in this file. All notable changes to the OpenClaw Home Assistant Integration will be documented in this file.
## [0.1.30] - 2026-02-20
### Fixed
- Treated `SpeechRecognition` `no-speech` as a normal listening condition instead of an error.
- Reduced voice error noise by avoiding retry scheduling for `no-speech` events.
- Added clearer in-card status text for silence/no-speech scenarios.
## [0.1.29] - 2026-02-20 ## [0.1.29] - 2026-02-20
### Fixed ### Fixed
+1 -1
View File
@@ -76,7 +76,7 @@ _CARD_PATH = Path(__file__).parent / "www" / _CARD_FILENAME
# URL at which the card JS is served (registered via register_static_path) # URL at which the card JS is served (registered via register_static_path)
_CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}" _CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}"
# Versioned URL used for Lovelace resource registration to avoid stale browser cache # Versioned URL used for Lovelace resource registration to avoid stale browser cache
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.29" _CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.30"
OpenClawConfigEntry = ConfigEntry OpenClawConfigEntry = ConfigEntry
+1 -1
View File
@@ -8,7 +8,7 @@
"iot_class": "local_polling", "iot_class": "local_polling",
"issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues", "issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues",
"requirements": [], "requirements": [],
"version": "0.1.29", "version": "0.1.30",
"dependencies": ["conversation"], "dependencies": ["conversation"],
"after_dependencies": ["hassio", "lovelace"] "after_dependencies": ["hassio", "lovelace"]
} }
@@ -13,7 +13,7 @@
* + subscribes to openclaw_message_received events. * + 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 // Max time (ms) to show the thinking indicator before falling back to an error
const THINKING_TIMEOUT_MS = 120_000; const THINKING_TIMEOUT_MS = 120_000;
@@ -611,6 +611,13 @@ class OpenClawChatCard extends HTMLElement {
console.debug("OpenClaw: Speech recognition aborted"); console.debug("OpenClaw: Speech recognition aborted");
return; 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") { if (err === "network") {
console.warn("OpenClaw: Speech recognition network error"); console.warn("OpenClaw: Speech recognition network error");
} else { } else {
@@ -642,7 +649,7 @@ class OpenClawChatCard extends HTMLElement {
this._voiceStatus = `Voice error: ${err}`; 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._scheduleVoiceRetry();
} }
this._render(); this._render();
+1 -1
View File
@@ -1,7 +1,7 @@
(async () => { (async () => {
try { try {
if (!customElements.get("openclaw-chat-card")) { if (!customElements.get("openclaw-chat-card")) {
const src = "/openclaw/openclaw-chat-card.js?v=0.1.29"; const src = "/openclaw/openclaw-chat-card.js?v=0.1.30";
console.info("OpenClaw loader importing", src); console.info("OpenClaw loader importing", src);
await import(src); await import(src);
} }