fix(voice_worker): the v2 brain answers in the asker's language
v1's tts_engine default (English-only Piper) made the reply engine force English, so Korean questions got English answers. The v2 brain speaks through the worker's MeloTTS and chat answers are not spoken, so it runs with tts_engine=melo; an output_language lock still wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ interface, so the worker logic is tested with a fake (voice_worker.spec.md, "His
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
@@ -121,7 +122,10 @@ class JarvisBrain:
|
||||
from jarvis.config import load_settings
|
||||
from jarvis.memory.db import Database
|
||||
|
||||
self.cfg = load_settings()
|
||||
# v1's tts_engine names the v1 desktop voice (English-only Piper by default), which makes the
|
||||
# engine lock replies to English. v2 speaks through the worker's TTS and chat answers are
|
||||
# not spoken, so the brain answers in the asker's language (an OUTPUT_LANGUAGE lock still wins).
|
||||
self.cfg = dataclasses.replace(load_settings(), tts_engine="melo")
|
||||
self.db = Database(self.cfg.db_path, self.cfg.sqlite_vss_path)
|
||||
self.language = language
|
||||
self._memories: dict = {}
|
||||
|
||||
@@ -233,7 +233,10 @@ which carry Discord's own time.
|
||||
`cancelled: true` and no audio. Each user keeps their own short-term dialogue
|
||||
memory (tool carry-over) across replies. The brain runs the reply engine with v1's single-user
|
||||
memory off (`legacy_memory=False`: no warm profile, diary or graph), because several people share
|
||||
this assistant and only the asker's scoped history may reach the prompt.
|
||||
this assistant and only the asker's scoped history may reach the prompt. It answers in the
|
||||
asker's language: v1's `tts_engine` setting (an English-only Piper voice by default) does not
|
||||
lock replies to English, because v2 speaks through the worker's TTS and chat answers are not
|
||||
spoken. An `output_language` lock in the jarvis settings still wins.
|
||||
The asker is set in `jarvis.reply.turn_state` for the turn, so tools that keep personal data
|
||||
(meals) store and read it under that person only.
|
||||
- `addressed` and `rank` are the conversation's questions (`app/src/conversation.spec.md`), answered
|
||||
|
||||
Reference in New Issue
Block a user