Skip to content

Fix #602: install.sh auto-installs ONNX Runtime for live mode STT - #604

Merged
joelteply merged 1 commit into
mainfrom
fix/install-onnxruntime
Mar 30, 2026
Merged

joelteply merged 1 commit into
mainfrom
fix/install-onnxruntime

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Problem

ONNX Runtime required for Silero VAD (live mode STT) but not installed automatically.

Fix

  • macOS: brew install onnxruntime
  • Linux: libonnxruntime-dev via apt

Test

  • Verified on macOS — onnxruntime installed, STT subtitles working

macOS: brew install onnxruntime
Linux: libonnxruntime-dev via apt

Without this, Silero VAD can't load and live mode has no speech-to-text.
Copilot AI review requested due to automatic review settings March 30, 2026 04:47
@joelteply
joelteply merged commit be02e43 into main Mar 30, 2026
3 of 5 checks passed
@joelteply
joelteply deleted the fix/install-onnxruntime branch March 30, 2026 04:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds ONNX Runtime installation to the tower installer so live-mode STT (Silero VAD) works out-of-the-box on macOS and Linux.

Changes:

  • macOS: auto-install onnxruntime via Homebrew if missing.
  • Linux/WSL: attempt to install libonnxruntime(-dev) via apt when ldconfig can’t find libonnxruntime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/scripts/install.sh
fi

# ONNX Runtime — required for Silero VAD (live mode speech-to-text)
if ! ldconfig -p 2>/dev/null | grep -q libonnxruntime; then

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new ldconfig check only looks for system-wide libonnxruntime, but this script already installs ONNX Runtime into ~/.continuum/lib later in this same Linux branch. Because ldconfig won’t see user-space installs, this will typically append libonnxruntime-dev/libonnxruntime to needed[] even when the subsequent user-space install would satisfy the requirement, potentially causing unnecessary/fragile apt installs. Consider checking for $HOME/.continuum/lib/libonnxruntime.so (or the presence of ORT libs in the intended location) before adding apt packages, or make the install strategy mutually exclusive (apt OR user-space download) with a single source of truth.

Suggested change
if ! ldconfig -p 2>/dev/null | grep -q libonnxruntime; then
# Check both system-wide libs (ldconfig) and the user-space install location.
if ! ldconfig -p 2>/dev/null | grep -q libonnxruntime && ! [ -f "$HOME/.continuum/lib/libonnxruntime.so" ]; then

Copilot uses AI. Check for mistakes.
Comment thread src/scripts/install.sh
Comment on lines +186 to +189
# ONNX Runtime — required for Silero VAD (live mode speech-to-text)
if ! ldconfig -p 2>/dev/null | grep -q libonnxruntime; then
needed+=("libonnxruntime-dev" "libonnxruntime")
fi

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says Linux installs ONNX Runtime via apt, but this script still performs a separate user-space download/install of ONNX Runtime (~/.continuum/lib) later in the same linux|wsl block. Either update the PR description to reflect the dual-path behavior, or adjust the script to pick a single installation method (and ensure the runtime lookup logic matches that choice).

Copilot uses AI. Check for mistakes.
Comment thread src/scripts/install.sh

# ONNX Runtime — required for Silero VAD (live mode speech-to-text)
if ! ldconfig -p 2>/dev/null | grep -q libonnxruntime; then
needed+=("libonnxruntime-dev" "libonnxruntime")

Copilot AI Mar 30, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing both libonnxruntime-dev and libonnxruntime looks heavier than necessary for this script’s usage: the runtime only needs the shared library, and this installer otherwise treats ONNX Runtime as a runtime dependency (it even copies libonnxruntime* into ~/.continuum/lib). If you keep the apt-based path, consider installing only the runtime package unless you’ve confirmed headers/static libs are required for the build on your target distros.

Suggested change
needed+=("libonnxruntime-dev" "libonnxruntime")
needed+=("libonnxruntime")

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants