The LXMF gateway now handles Sideband push-to-talk voice messages end to end. Inbound: a PTT message carries its audio in LXMF.FIELD_AUDIO (`[audio_mode, bytes]`); `lxmf_transport.parse_audio_field` normalizes it and the adapter transcribes it into an ordinary command when `gateway.lxmf.voice.enabled` is set. HQ Opus/OGG goes through faster-whisper (requirements/transcribe.txt); non-HQ Codec2 through the optional pycodec2 bindings (requirements/codec2.txt). No microphone stack is needed. Outbound: a chat that last messaged by voice is answered with a synthesized voice message when `gateway.lxmf.voice.reply_with_voice` is on (the default). `voice_transport.build_synthesizer` speaks the reply with Piper and `voice_transport.pcm_to_opus_ogg` encodes it to OGG/Opus (48 kHz, PyAV's libopus); `lxmf_transport.audio_fields` attaches it as a Sideband HQ PTT message, with the reply text as the content so a text-only client still sees it. The reply mode follows the chat's most recent inbound message. A missing synthesizer or any synthesis/encode failure is traced and the reply falls back to text. Deps: requirements/tts.txt (piper-tts + PyAV), still no microphone. Also make LXMF replies result-only (`LxmfAdapter.result_only`, overridable via `gateway.lxmf.result_only: false`): send the skill's result line, dropping scheduler bookkeeping and the `<skill>: ok —` wrapper. Wiring: new config keys under `gateway.lxmf` (result_only) and `gateway.lxmf.voice` (reply_with_voice, max_speak_chars, reply_bitrate, tts); regenerated config.example.json; the setup interview asks how to handle voice messages and the install plan adds `install_lxmf_tts` (bootstrap installs requirements/tts.txt and downloads the reply voice); cli anchors the LXMF voice_dir to .runtime/voice/tts. Tests cover the audio field shape, the outbound queue, the adapter's voice-chat tracking and synthesis fallbacks, result-only routing, the synthesis/encode helpers, and the setup plan. Docs updated.
332 lines
7.8 KiB
JSON
332 lines
7.8 KiB
JSON
{
|
|
"tau": 0.6,
|
|
"max_reentries": 3,
|
|
"query_recall_window": 30,
|
|
"new_skill_creation": "deny",
|
|
"verbosity": "result",
|
|
"chain": {
|
|
"result_chars": 300
|
|
},
|
|
"assess": {
|
|
"done_tau": 0.5,
|
|
"fail_tau": 0.5
|
|
},
|
|
"timezone": "",
|
|
"navigation": {
|
|
"intent_tau": 0.6,
|
|
"category_tau": 0.75,
|
|
"action_tau": 0.5,
|
|
"softmax_bypass_tau": 0.5
|
|
},
|
|
"queue": {
|
|
"max_size": 100
|
|
},
|
|
"engine": {
|
|
"provider": "semif",
|
|
"backend": "llamacpp",
|
|
"context_tokens": 4096,
|
|
"threads": 8,
|
|
"gpu_layers": 0,
|
|
"gpu_device": null,
|
|
"gpu_split": 0,
|
|
"winnow": {
|
|
"base_url": "http://127.0.0.1:8091",
|
|
"model": "",
|
|
"context_tokens": 32768,
|
|
"api_key": "!secret engine_winnow_api_key",
|
|
"timeout": 120,
|
|
"retries": 0,
|
|
"user_agent": "semif-agent",
|
|
"extra_headers": {}
|
|
},
|
|
"gguf": ""
|
|
},
|
|
"llm": {
|
|
"provider": "ollama",
|
|
"base_url": "http://localhost:11434/v1",
|
|
"model": "",
|
|
"api_key": "!secret llm_api_key",
|
|
"user_agent": "",
|
|
"timeout": 600,
|
|
"stream": false,
|
|
"idle_warn": 30,
|
|
"idle_timeout": 120,
|
|
"context_window": 0,
|
|
"temperature": 0.2,
|
|
"top_p": 0.9,
|
|
"presence_penalty": 0.0,
|
|
"frequency_penalty": 0.0,
|
|
"disable_thinking": true,
|
|
"semif": {
|
|
"temperature": 0.0,
|
|
"max_tokens": 256
|
|
}
|
|
},
|
|
"codegen": {
|
|
"provider": "ollama",
|
|
"base_url": "http://localhost:11434/v1",
|
|
"model": "",
|
|
"api_key": "!secret codegen_api_key",
|
|
"user_agent": "",
|
|
"timeout": 3600,
|
|
"stream": true,
|
|
"idle_warn": 60,
|
|
"idle_timeout": 180,
|
|
"context_window": 0,
|
|
"smart_limit": 250000,
|
|
"warn_limit": 500000,
|
|
"max_fill_ratio": 0.9,
|
|
"warn_fill_ratio": 0.7,
|
|
"max_output": 0.85,
|
|
"chars_per_token": 4.0,
|
|
"temperature": 1,
|
|
"top_p": 0.95,
|
|
"presence_penalty": 0,
|
|
"frequency_penalty": 1,
|
|
"max_attempts": 3,
|
|
"approval": {
|
|
"wait_timeout": 900
|
|
},
|
|
"fidelity": {
|
|
"enabled": true,
|
|
"max_attempts": 1,
|
|
"tau": 0.6
|
|
},
|
|
"repair": {
|
|
"enabled": true,
|
|
"max_attempts": 1
|
|
},
|
|
"test_timeout": 30,
|
|
"test_max_attempts": 3,
|
|
"max_body_tokens": 0,
|
|
"max_test_tokens": 0,
|
|
"decision_reserve_tokens": 1024,
|
|
"contract_search": {
|
|
"enabled": true
|
|
},
|
|
"degeneration": {
|
|
"enabled": true,
|
|
"threshold": 0.9,
|
|
"interval": 8000,
|
|
"window": 2000,
|
|
"min_chars": 4000
|
|
}
|
|
},
|
|
"skill_bodies": "data/skills",
|
|
"log": "data/decisions.jsonl",
|
|
"trace": "data/runs.jsonl",
|
|
"category_registry": "data/categories.json",
|
|
"simplex_chat": {
|
|
"port": 5226,
|
|
"display_name": "semif",
|
|
"forward_port": 5228,
|
|
"forward_display_name": "semif-forward"
|
|
},
|
|
"gateway": {
|
|
"humanize": {
|
|
"enabled": true,
|
|
"timeout": 20.0,
|
|
"max_tokens": 200,
|
|
"max_chars": 600
|
|
},
|
|
"simplex": {
|
|
"enabled": true,
|
|
"ws_url": "ws://127.0.0.1:5226",
|
|
"allowed_users": [],
|
|
"allow_all_users": false,
|
|
"auto_accept": true,
|
|
"home_channel": "",
|
|
"reply_prefix": "",
|
|
"text_batch_delay": 0.8,
|
|
"reconnect": {
|
|
"initial": 1.0,
|
|
"max": 60.0,
|
|
"jitter": 0.2
|
|
}
|
|
},
|
|
"lxmf": {
|
|
"enabled": false,
|
|
"allowed_users": [],
|
|
"allow_all_users": false,
|
|
"display_name": "semif",
|
|
"announce_interval": 3600,
|
|
"stamp_cost": 8,
|
|
"desired_method": "direct",
|
|
"propagation_node": "",
|
|
"config_dir": "",
|
|
"storage_path": "",
|
|
"home_channel": "",
|
|
"reply_prefix": "",
|
|
"text_batch_delay": 0.8,
|
|
"result_only": true,
|
|
"voice": {
|
|
"enabled": false,
|
|
"reply_with_voice": true,
|
|
"max_speak_chars": 600,
|
|
"reply_bitrate": 24000,
|
|
"stt": {
|
|
"model": "base.en",
|
|
"device": "cpu",
|
|
"compute_type": "int8",
|
|
"language": "en"
|
|
},
|
|
"tts": {
|
|
"voice": "en_US-lessac-medium",
|
|
"voice_dir": "",
|
|
"speaker_id": 0,
|
|
"length_scale": 1.0,
|
|
"volume": 1.0
|
|
}
|
|
}
|
|
},
|
|
"voice": {
|
|
"enabled": false,
|
|
"chat_id": "voice",
|
|
"display_name": "voice",
|
|
"home_channel": "voice",
|
|
"reply_prefix": "",
|
|
"result_only": true,
|
|
"max_speak_chars": 600,
|
|
"listen_timeout_s": 3.0,
|
|
"cue": {
|
|
"enabled": true,
|
|
"frequency": 880,
|
|
"duration_ms": 120,
|
|
"volume": 0.9,
|
|
"submit_frequency": 0,
|
|
"submit_duration_ms": 100,
|
|
"submit_notes": [
|
|
[
|
|
1046.5,
|
|
70
|
|
],
|
|
[
|
|
1568.0,
|
|
90
|
|
]
|
|
],
|
|
"note_gap_ms": 20
|
|
},
|
|
"wake": {
|
|
"model": "hey_computer",
|
|
"threshold": 0.2,
|
|
"inference_framework": "onnx",
|
|
"model_dir": ""
|
|
},
|
|
"stt": {
|
|
"model": "base.en",
|
|
"device": "cpu",
|
|
"compute_type": "int8",
|
|
"language": "en"
|
|
},
|
|
"tts": {
|
|
"voice": "en_US-lessac-medium",
|
|
"voice_dir": "",
|
|
"speaker_id": 0,
|
|
"length_scale": 1.0,
|
|
"volume": 1.0
|
|
},
|
|
"audio": {
|
|
"input_device": "",
|
|
"output_device": "",
|
|
"sample_rate": 16000,
|
|
"frame_ms": 80,
|
|
"capture_sample_rate": 0,
|
|
"output_sample_rate": 0,
|
|
"dc_removal": true,
|
|
"read_timeout_s": 1.0,
|
|
"stall_timeout_s": 5.0
|
|
},
|
|
"vad": {
|
|
"silence_ms": 500,
|
|
"min_speech_ms": 120,
|
|
"max_utterance_s": 30,
|
|
"min_command_ms": 700,
|
|
"initial_silence_ms": 1500,
|
|
"aggressiveness": 2,
|
|
"energy_threshold": 200.0
|
|
},
|
|
"follow_up_window_s": 0.0
|
|
}
|
|
},
|
|
"dashboard": {
|
|
"port": 8765,
|
|
"host": "127.0.0.1"
|
|
},
|
|
"skill_packs": "packs",
|
|
"secrets_file": "secrets.json",
|
|
"_comment": "GENERATED from the core schema (semif_agent/config.py) and each pack's pack.json `config` schema \u2014 do not hand-edit; edit a pack's schema or the core schema. This is the reference example; the live per-machine config is split under config/ (see config.json's include list) and secrets live in the gitignored secrets.json, referenced as '!secret <key>'.",
|
|
"bridges": {
|
|
"llm": {
|
|
"enabled": true,
|
|
"host": "127.0.0.1",
|
|
"port": 5229,
|
|
"token": "!secret llm_token"
|
|
},
|
|
"browser": {
|
|
"enabled": false,
|
|
"host": "127.0.0.1",
|
|
"port": 5232,
|
|
"token": "!secret browser_token",
|
|
"engine": "chromium",
|
|
"headless": true,
|
|
"channel": "",
|
|
"executable_path": "",
|
|
"profile_dir": "",
|
|
"browsers_path": "",
|
|
"screenshot_dir": "",
|
|
"default_timeout": 30.0,
|
|
"max_text_chars": 20000
|
|
},
|
|
"nextcloud": {
|
|
"enabled": true,
|
|
"host": "127.0.0.1",
|
|
"port": 5230,
|
|
"token": "!secret nextcloud_token",
|
|
"url": "",
|
|
"username": "",
|
|
"app_password": "!secret nextcloud_app_password",
|
|
"default_calendar": "",
|
|
"default_task_calendar": "",
|
|
"default_addressbook": "",
|
|
"verify_tls": true,
|
|
"timeout": 30
|
|
},
|
|
"outlook": {
|
|
"enabled": false,
|
|
"host": "127.0.0.1",
|
|
"port": 5231,
|
|
"token": "!secret outlook_token",
|
|
"client_id": "",
|
|
"tenant": "common",
|
|
"token_path": ".runtime/outlook/token.json",
|
|
"default_calendar": "",
|
|
"default_task_list": "",
|
|
"default_mail_folder": "inbox",
|
|
"default_timezone": "UTC",
|
|
"verify_tls": true,
|
|
"timeout": 30
|
|
},
|
|
"simplex": {
|
|
"enabled": true,
|
|
"host": "127.0.0.1",
|
|
"port": 5227,
|
|
"token": "!secret simplex_token",
|
|
"max_inbox": 100,
|
|
"ws_url": "ws://127.0.0.1:5228",
|
|
"user_id": 1,
|
|
"auto_accept": true,
|
|
"reconnect": {
|
|
"initial": 1.0,
|
|
"max": 60.0,
|
|
"jitter": 0.2
|
|
}
|
|
}
|
|
},
|
|
"packs": {
|
|
"essentials": {
|
|
"enabled": true
|
|
}
|
|
}
|
|
}
|