Skip to main content

Prerequisites

Before installing Voxray, confirm the following tools are available on your machine.
The default WebSocket-only build has no C compiler dependency. You only need a C compiler if you plan to use WebRTC transport with TTS audio output via Opus encoding.

Install Go and System Dependencies

Install Go using Homebrew:
Verify the installation:
The CGO toolchain (Clang) ships with Xcode Command Line Tools. Install or confirm it is present:
If already installed, this command exits immediately. Verify:

Clone the Repository

Download Go module dependencies:

Build Variants

Voxray ships two primary build targets. Choose based on which transport you need.

Default build — WebSocket only

No C compiler required. CGO is explicitly disabled so the binary is fully static and portable.

Voice build — WebSocket and WebRTC with Opus

Requires gcc or clang on your PATH. Enables the Opus encoder so the server can deliver TTS audio over WebRTC peer connections. Linux / macOS:
Windows (PowerShell):
Manual — any OS:
If you run a binary built without CGO and a client connects via WebRTC, the server returns HTTP 503 and logs opus encoder unavailable (build without cgo). Use make build-voice if WebRTC transport is required.

Docker

Voxray ships a production-ready multi-stage Dockerfile. The default Docker build produces a WebSocket-only binary (CGO disabled, static binary on Alpine). Build the image:
Run with a config file mounted:
Pass a config path via environment variable:
The Docker image exposes port 8080 by default. The VOXRAY_CONFIG environment variable is pre-set to /app/config.json in the image. Mount your config at that path or override VOXRAY_CONFIG to point elsewhere.

Environment Setup

Create your config file

Copy the example config and open it in your editor:

Four fields you must configure before first run

Every config file requires at minimum these four top-level settings before the server can start a voice pipeline: A minimal working config looks like:
Replace YOUR_OPENAI_API_KEY with your actual key. API keys can also be supplied via environment variables (for example, OPENAI_API_KEY) — they do not need to be embedded in the config file.
Set "transport": "both" and add "webrtc_ice_servers": ["stun:stun.l.google.com:19302"] if you want both WebSocket and WebRTC active at the same time. See the WebRTC quickstart for the full configuration.

Verify the Installation

Start the server:
You should see startup log lines similar to:
Confirm the health endpoint responds:
Confirm the readiness endpoint:

Next Steps

WebSocket Quickstart

Connect a client to the WebSocket endpoint and make your first voice call.

WebRTC Quickstart

Build with CGO and connect a browser client via WebRTC for real-time audio.

Configuration Reference

Explore all config fields: transports, providers, recording, transcripts, and more.

Supported Providers

See the full matrix of STT, LLM, and TTS providers and their config keys.