onju-v2/run.sh
justLV dccb6ced15 Stream agentic LLM responses, add contextual stall classifier, rename backends
- SSE sentence-level streaming: consume agent deltas, split on sentence
  boundaries (handles no-space chunk joins), synthesize+send each sentence
  as it forms; intermediate sends keep mic_timeout=0
- Gemini-backed stall classifier for agentic mode only: narrow to
  retrieval-only, pass prev user/assistant for context awareness, avoid
  action promises the stall can't honor, sub-second latency via
  reasoning_effort=none
- Rename backends: local -> conversational, managed -> agentic
  (files, classes, config keys)
- PTT interrupt fix: set device.interrupted when button-press frames
  arrive mid-response and keep buffering so the next utterance captures
  cleanly instead of being dropped
- Startup summary log showing ASR, LLM, STALL, and TTS config at a glance
- run.sh launcher with Homebrew libopus path for macOS
- voice_prompt config for per-turn agentic reminders; inline continuity
  note injection so the agent knows what the stall just said aloud
- README section on streaming, stalls, and the first-turn OpenClaw caveat
2026-04-12 13:55:59 -07:00

22 lines
873 B
Bash
Executable file

#!/bin/bash
# Run the onju-voice pipeline server.
#
# Usage:
# ./run.sh # default config
# ./run.sh --warmup # warmup LLM+TTS on startup
# ./run.sh --device onju=10.0.0.5 # pre-register a device
cd "$(dirname "$0")"
# opuslib uses ctypes.util.find_library('opus'), which on macOS does not search
# Homebrew prefixes. Point the dynamic loader at the brew opus lib if present.
if [ "$(uname)" = "Darwin" ] && command -v brew >/dev/null 2>&1; then
if opus_prefix="$(brew --prefix opus 2>/dev/null)" && [ -d "$opus_prefix/lib" ]; then
export DYLD_FALLBACK_LIBRARY_PATH="$opus_prefix/lib:${DYLD_FALLBACK_LIBRARY_PATH:-/usr/local/lib:/usr/lib}"
else
echo "Warning: 'opus' not installed via Homebrew. Run: brew install opus"
fi
fi
echo "Starting onju-voice pipeline..."
uv run python -m pipeline.main "$@"