wren applies all/every commands itself, answers temperatures, reads aliases and number words; tts says units and clock times

wren's model answers "turn off all lights" with one call, and at 0.98 a
living room light switched on. The node now applies such a command to every
wired target of the kind. Number words become digits ("in five minutes"
lost its delay), aliases put the house's words and known mishearings in the
model's, and sensors.temperature is answered from <area>_temperature or
outdoor. tts writes out units and clock times before speaking.
This commit is contained in:
Melvin Strobl
2026-10-22 12:34:40 +02:00
parent bf63b3d6d4
commit 6b575a4989
6 changed files with 362 additions and 23 deletions
+10 -1
View File
@@ -6,7 +6,7 @@ from typing import Any
from fluksio.ai import client
from fluksio.flow.messages import DType, MessageSpec
from fluksio.flow.nodes.speech import SttNode, TtsNode, sentences
from fluksio.flow.nodes.speech import SttNode, TtsNode, sentences, speakable
from fluksio.flow.pipeline import Pipeline
URL = "http://speech:8100"
@@ -40,6 +40,15 @@ def test_sentences_are_cut_after_their_ending():
]
def test_units_and_clock_times_are_said_as_words():
said = speakable("22 °C and 21.5° at 07:30, 3.4 kWh, 505 W, 2 kW, 7:05 or 18:00.")
assert said == (
"22 degrees and 21.5 degrees at 7 30, 3.4 kilowatt hours, 505 watts, "
"2 kilowatts, 7 oh 5 or 18 o'clock."
)
assert speakable("Kitchen light on, 3 Watts.") == "Kitchen light on, 3 Watts."
def test_an_utterance_is_one_session_committed_when_listening_ends(monkeypatch):
heard: list[bytes] = []