iobroker.assistant 1.4.11 → 1.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/build/lib/nlu.js +25 -0
- package/build/lib/nlu.js.map +1 -1
- package/build/lib/voice/esphome.js +230 -30
- package/build/lib/voice/esphome.js.map +1 -1
- package/build/lib/voice/vad.js +8 -0
- package/build/lib/voice/vad.js.map +1 -1
- package/build/main.js +85 -0
- package/build/main.js.map +1 -1
- package/io-package.json +14 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -237,6 +237,9 @@ train it twice.
|
|
|
237
237
|
Placeholder for the next version (at the beginning of the line):
|
|
238
238
|
### **WORK IN PROGRESS**
|
|
239
239
|
-->
|
|
240
|
+
### 1.4.12 (2026-11-05)
|
|
241
|
+
* (@GermanBluefox) ESPHome satellites: dialog mode — "ioBroker, Dialogmodus an" and the satellite listens again after every answer without the wake word (pauses are fine, nothing understood just listens on), "Dialogmodus aus" or a stop ends it, after 5 minutes without a request it ends by itself; state `satellites.<id>.dialog` shows and switches it
|
|
242
|
+
|
|
240
243
|
### 1.4.11 (2026-11-05)
|
|
241
244
|
* (@GermanBluefox) Speech recognition with the adapter ai-parakeet (NVIDIA Parakeet on the CPU, offline, 25 European languages) as provider or fallback — the audio goes to its instance over the message bus, so it may run on another host
|
|
242
245
|
* (@GermanBluefox) Settings: buttons "Install pi-agent" and "Install ai-parakeet" install the adapter on the host of this instance if needed (from the repository, else from npm), create an instance and select it
|
package/build/lib/nlu.js
CHANGED
|
@@ -17,6 +17,7 @@ exports.parseWeekdays = parseWeekdays;
|
|
|
17
17
|
exports.parseDurationSeconds = parseDurationSeconds;
|
|
18
18
|
exports.isStopCommand = isStopCommand;
|
|
19
19
|
exports.mentionsScript = mentionsScript;
|
|
20
|
+
exports.dialogCommand = dialogCommand;
|
|
20
21
|
exports.normalize = normalize;
|
|
21
22
|
exports.splitCommands = splitCommands;
|
|
22
23
|
const TURN_ON = new Set([
|
|
@@ -757,6 +758,30 @@ const SCRIPT_RE = /skript|(?<![\p{L}])(?:java|type)?script|скрипт|blockly/
|
|
|
757
758
|
function mentionsScript(text) {
|
|
758
759
|
return SCRIPT_RE.test(normalize(text));
|
|
759
760
|
}
|
|
761
|
+
/** "Dialogmodus", "dialog mode", "режим диалога" and their variants (on normalized text). */
|
|
762
|
+
const DIALOG_MODE_RE = /(?<![\p{L}])(?:dialog\p{L}*[\s-]*modus|gespraechs[\s-]*modus|unterhaltungs[\s-]*modus|dialog(?:ue)?[\s-]*mode|conversation[\s-]*mode|режим\p{L}*\s+(?:диалог|разговор)\p{L}*|диалогов\p{L}*\s+режим\p{L}*)(?![\p{L}])/iu;
|
|
763
|
+
const DIALOG_ON_RE = /(?<![\p{L}])(?:an|ein|einschalten|anschalten|anmachen|aktivier\p{L}*|start\p{L}*|beginn\p{L}*|on|enable\p{L}*|activate\p{L}*|включ\p{L}*|запуст\p{L}*|начн\p{L}*|начать|активир\p{L}*)(?![\p{L}])/iu;
|
|
764
|
+
const DIALOG_OFF_RE = /(?<![\p{L}])(?:aus|ausschalten|ausmachen|deaktivier\p{L}*|beend\p{L}*|stopp?\p{L}*|ende|off|disable\p{L}*|deactivate\p{L}*|end|exit|quit|выключ\p{L}*|отключ\p{L}*|останов\p{L}*|заверш\p{L}*|законч\p{L}*|выйд\p{L}*|выход\p{L}*)(?![\p{L}])/iu;
|
|
765
|
+
/** A question about the dialog mode is not a command to switch it ("how do I switch the dialog mode on?"). */
|
|
766
|
+
const DIALOG_QUESTION_RE = /^(?:wie|was|warum|wieso|weshalb|wozu|wofuer|gibt es|ist|sind|how|what|why|is|are|как|что|зачем|почему)(?![\p{L}])|(?<![\p{L}])ли(?![\p{L}])/iu;
|
|
767
|
+
/**
|
|
768
|
+
* "Dialogmodus an" / "dialog mode off" / "включи режим диалога": switch the dialog mode of the satellite (it listens
|
|
769
|
+
* again after every answer, without the wake word). null when the text is no such command — a question about it, a
|
|
770
|
+
* longer sentence that only mentions it, or one that says both on and off.
|
|
771
|
+
*/
|
|
772
|
+
function dialogCommand(text) {
|
|
773
|
+
const norm = normalize(text)
|
|
774
|
+
.replace(/[.,!;:"„“«»]/g, ' ')
|
|
775
|
+
.trim();
|
|
776
|
+
if (!DIALOG_MODE_RE.test(norm) || DIALOG_QUESTION_RE.test(norm) || norm.split(/\s+/).length > 8) {
|
|
777
|
+
return null;
|
|
778
|
+
}
|
|
779
|
+
// only the words around the mode phrase say on or off
|
|
780
|
+
const rest = norm.replace(DIALOG_MODE_RE, ' ');
|
|
781
|
+
const on = DIALOG_ON_RE.test(rest);
|
|
782
|
+
const off = DIALOG_OFF_RE.test(rest);
|
|
783
|
+
return on === off ? null : on ? 'on' : 'off';
|
|
784
|
+
}
|
|
760
785
|
/** Normalize for matching: lowercase, German umlauts → ascii, ß → ss, Russian ё → е. */
|
|
761
786
|
function normalize(s) {
|
|
762
787
|
return s
|