luna-voiced: mic -> whisper-cpp (local, vulkan) -> Hermes' API on mars ->
ElevenLabs streaming TTS -> speaker, bound to SUPER+V. State, amplitude
and a viseme timeline are published on a unix socket; nothing consumes
that yet, but it is the data source the quickshell avatar will read.
STT stays local on purpose. mars already runs faster-whisper for Telegram
voice notes, but routing the mic through it would put every spoken word
on the network for no latency win.
Shape notes, all of them things the first live runs decided:
- Viseme offsets are relative to speech_start (emitted when the first
PCM frame reaches the speaker), never wall clock, so the shell and
the daemon never have to compare clocks. ElevenLabs sends character
alignment, not visemes, so the mapping is ours; the glTF morph target
names are the contract.
- clean_for_speech is a whitelist. She writes "(¬‿¬)", whose characters
live in Latin-1 and punctuation blocks rather than any emoji range,
so enumerating what to drop never converges. Em dashes become commas
because they are a pause — dropping one ran two clauses together and
changed what a sentence meant.
- whisper invents words out of silence ("you", "Thank you."), and a
held key over a quiet room is long AND empty, so has_speech gates on
the loudest 100ms window rather than on duration.
- Beeps on key down/up and a distinct low tone for "heard nothing":
push-to-talk with no acknowledgement is indistinguishable from broken,
and a dead mic must not feel like a slow reply.
- A warmup request at startup: her first reply after the container
starts costs ~16s against ~5s warm, and the first one is always the
one you are waiting for.
- `luna-voice watch` prints the socket protocol and `luna-voice say`
runs a turn from typed text, which is how a broken mic is told apart
from a broken pipeline.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
47 lines
2.2 KiB
Nix
47 lines
2.2 KiB
Nix
{ config, ... }:
|
|
|
|
# sops-nix wiring for terra (desktop). Encrypted values in ../../secrets/terra.yaml,
|
|
# decrypted with terra's own SSH host key (recipient in ../../.sops.yaml).
|
|
# The host key is pre-generated on the laptop and shipped at install
|
|
# (nixos-anywhere --extra-files -> /etc/ssh/ssh_host_ed25519_key).
|
|
{
|
|
sops.defaultSopsFile = ../../secrets/terra.yaml;
|
|
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
|
|
sops.secrets.tailscale_authkey = { };
|
|
|
|
sops.secrets.darman_password.neededForUsers = true;
|
|
users.users.darman.hashedPasswordFile = config.sops.secrets.darman_password.path;
|
|
|
|
# Credentials file for the //jupiter/data cifs mount (see configuration.nix).
|
|
# samba_password mirrors jupiter's own samba_password secret (services/network/samba.nix) —
|
|
# same value, just also encrypted to terra so it can authenticate as the same smb user.
|
|
sops.secrets.samba_password = { };
|
|
sops.templates."jupiter-smb.credentials".content = ''
|
|
username=darman
|
|
password=${config.sops.placeholder.samba_password}
|
|
'';
|
|
|
|
# LibreChat's CREDS_KEY/IV encrypt stored user credentials (linked 3rd-party
|
|
# API keys etc) at rest in mongo; JWT_SECRET/JWT_REFRESH_SECRET sign session
|
|
# tokens. All four are random, generated once with `sops --set` (see
|
|
# CLAUDE.md) — losing/rotating them just invalidates existing sessions and
|
|
# any saved per-user API keys, nothing else depends on their value.
|
|
# luna-voiced (services/desktop/luna-voice.nix) runs as a USER service, so
|
|
# these cannot stay root:root 0400 — a user manager cannot read them and
|
|
# LoadCredential does not bridge that gap either. Hence owner, not mode.
|
|
#
|
|
# hermes_api_server_key mirrors secrets/mars.yaml (the serving side);
|
|
# elevenlabs_api_key mirrors it too, because client-direct TTS is the
|
|
# documented low-latency path — terra calls ElevenLabs itself rather than
|
|
# relaying audio through mars. Rotating that key therefore touches BOTH
|
|
# files; see CLAUDE.md.
|
|
sops.secrets.hermes_api_server_key.owner = "darman";
|
|
sops.secrets.elevenlabs_api_key.owner = "darman";
|
|
|
|
sops.secrets.librechat_creds_key = { };
|
|
sops.secrets.librechat_creds_iv = { };
|
|
sops.secrets.librechat_jwt_secret = { };
|
|
sops.secrets.librechat_jwt_refresh_secret = { };
|
|
}
|