feat(terra): luna v3 voice, channel marker and rail panel
- TTS defaults to eleven_v3_conversational over the Text to Dialogue socket: performs audio tags and gets her German right. Flash still works via the TTS socket. - Every spoken message is prefixed with a [voice] marker so luna's profile on mars can tell the channel apart. - LunaIndicator/LunaCall replaced by a LunaPanel in the bar rail, with captions; headless test updated to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
# Voice loop for luna: hold a key, talk, hear her answer.
|
||||
# Voice loop for luna: SUPER+V opens the mic, talk, hear her answer.
|
||||
#
|
||||
# mic -> whisper-cpp (local, vulkan) -> Hermes' OpenAI-compatible API on mars
|
||||
# -> ElevenLabs streaming TTS -> speaker. State, amplitude and the viseme
|
||||
# timeline are published on a unix socket for the quickshell avatar to read
|
||||
# (nothing consumes it yet — the widget is the next phase).
|
||||
# -> ElevenLabs streaming TTS -> speaker. State, amplitude, captions and a
|
||||
# viseme timeline are published on a unix socket; the rail's LunaPanel reads
|
||||
# them (dotfiles/quickshell/HyprChrome/Widgets/Bar/Luna), and the viseme
|
||||
# stream is there for the avatar that replaces its meter later.
|
||||
#
|
||||
# A USER service, not a system one: it needs darman's pipewire session and his
|
||||
# XDG_RUNTIME_DIR for the socket. That is also why the two secrets it reads
|
||||
@@ -57,8 +58,13 @@ in
|
||||
|
||||
ttsModel = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "eleven_flash_v2_5";
|
||||
description = "~75ms model, the one ElevenLabs recommends for live conversation.";
|
||||
default = "eleven_v3_conversational";
|
||||
description = ''
|
||||
eleven_v3* streams over the Text to Dialogue socket and performs audio
|
||||
tags ([laughs], [sighs]); it also gets her German right, which Flash
|
||||
reads with an English accent. Anything else uses the TTS socket, e.g.
|
||||
"eleven_flash_v2_5" — half the price per character, faster, no tags.
|
||||
'';
|
||||
};
|
||||
|
||||
hermesKeyFile = lib.mkOption {
|
||||
@@ -99,6 +105,21 @@ in
|
||||
description = "Silence that ends an utterance.";
|
||||
};
|
||||
|
||||
voiceMarker = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "[voice]";
|
||||
description = ''
|
||||
Prefixed to every spoken message so luna can tell this channel from
|
||||
Telegram or the dashboard, and adjust — no kaomoji, no markdown, short
|
||||
answers. Put the rule in HER profile on mars rather than only in
|
||||
systemPrompt below: the marker travels with the message, so it still
|
||||
identifies the channel in whatever history Hermes keeps, and one place
|
||||
governs her voice manners across every client that sends it.
|
||||
|
||||
Empty string disables the marker.
|
||||
'';
|
||||
};
|
||||
|
||||
systemPrompt = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
@@ -131,6 +152,7 @@ in
|
||||
LUNA_VAD_MULT = toString cfg.vadMult;
|
||||
LUNA_VAD_FLOOR = toString cfg.vadFloor;
|
||||
LUNA_SILENCE_MS = toString cfg.silenceMs;
|
||||
LUNA_VOICE_MARKER = cfg.voiceMarker;
|
||||
} // lib.optionalAttrs (cfg.systemPrompt != null) {
|
||||
LUNA_SYSTEM_PROMPT = cfg.systemPrompt;
|
||||
} // lib.optionalAttrs (cfg.inputDevice != null) {
|
||||
|
||||
Reference in New Issue
Block a user