Voice
Voice recognition panel (Windows only). Communicates with the VoiceAgent.Win.exe
subprocess via JSON Lines over stdin/stdout.
Protocol:
Client → Agent: {"cmd":"start"} | {"cmd":"speak","text":"...","lang":"<iso2>"} | {"cmd":"stop"}
Agent → Client: {"type":"ready"|"transcript"|"done"|"error", ...}
The lang field is a two-letter ISO language code (e.g. "it", "en", "de") derived from
. The VoiceAgent maps it to the appropriate TTS voice:
supported languages → Kokoro neural TTS, unsupported → Windows SAPI fallback.
== Streaming TTS buffering strategy ==
LLM responses are streamed token by token via .
Tokens are accumulated into a buffer; a flush is triggered when sentence-ending
punctuation (. ! ?) is found and there is text AFTER it (a new sentence starting).
This produces the largest possible natural phrase instead of tiny fragments.
Key design choices:
- Punctuation at the LAST position is NOT flushed — we WAIT for more text to come.
This avoids splitting "?" when the LLM might still be generating the next sentence.
- Only . ! ? trigger splits — commas and semicolons are pauses the TTS handles naturally.
- No timeout flush: waiting for punctuation (even 1-2s) is less annoying than
chopped mid-sentence audio. The pause after . ! ? sounds natural to human listeners.
Built by the BuildVoiceAgentPlugin MSBuild target. Not available on Linux.
Agent orchestrator
G u i chat history
Provides the chat conversation text for the graphical user interface (GUI).
Each entry is a (role, content) tuple where role is "User" or "AI Agent".
This is NOT the conversation history sent to the LLM — see LLMUtility._messageHistory for that.
| Item1 | Item2 |
|---|
Current status.
Stopped
Chat history
Provides the chat conversation text for the graphical user interface (GUI).
| Item1 | Item2 |
|---|
Last AI response.