Skip to main content

LLM

Supported

STT

Not supported

TTS

Not supported
Ollama is a local LLM inference server that exposes an OpenAI-compatible REST API. It downloads and runs open-source models (Llama, Mistral, Phi, Gemma, and more) directly on your machine — no external API calls, no usage costs, and no data leaving your infrastructure. Voxray integrates Ollama as an LLM provider via "llm_provider": "ollama". Because Ollama runs locally, you pair it with a cloud STT and TTS provider (Groq, ElevenLabs, OpenAI, etc.) for a full voice pipeline.

Prerequisites

Install Ollama

On macOS, you can also install via Homebrew:

Start the Ollama server

Ollama listens on http://localhost:11434 by default and exposes an OpenAI-compatible API at /v1. Voxray connects to http://localhost:11434/v1 unless you override OLLAMA_BASE_URL.

Pull a model

The model must be pulled before Voxray starts — Voxray does not auto-pull models. Verify it is available:

Quick Start Config

Ollama does not require an API key. The OLLAMA_API_KEY environment variable (and "ollama" key in api_keys) are accepted by Voxray but passed through unused — the Ollama server ignores them.

Custom Ollama URL

By default, Voxray connects to http://localhost:11434/v1. Override this with the OLLAMA_BASE_URL environment variable when running Ollama on a remote host or a non-default port:
When running Voxray in Docker and Ollama on the host, use http://host.docker.internal:11434/v1 as the base URL on macOS and Windows. On Linux, use the host’s bridge IP (typically http://172.17.0.1:11434/v1).

Pull any model before referencing it in config:
Update the "model" key in config.json to match the pulled model name exactly (including the tag).

GPU Acceleration

Ollama automatically detects and uses available GPU hardware — no additional configuration is needed in Voxray: Check whether Ollama is using your GPU after starting ollama serve:
The output shows active models and whether they are loaded in GPU memory.

Latency Guidance

Voice agents are latency-sensitive. The LLM is typically the largest contributor to end-to-end response time with local inference.
For lowest latency in production, prefer llama3.2:3b or llama3.1:8b. Both run well on a single consumer GPU. For highest response quality with acceptable latency, use a quantized llama3.1:70b (the q4_K_M variant) if you have 24–48 GB VRAM.

Full Example: Local LLM with Groq STT and TTS

Start Ollama and Voxray, then connect to /ws or /webrtc/offer. All LLM inference runs locally; only STT and TTS calls leave your machine.

Troubleshooting