Skip to main content

Tobii Gaze Server

A WebSocket server for streaming Tobii Eye Tracker gaze data using the Tobii Stream Engine.

Features

  • Real-time gaze data streaming via WebSocket
  • Uses Tobii Stream Engine for calibrated gaze data
  • Easy integration with web applications

Requirements

  • Windows OS
  • Tobii Eye Tracker with Tobii EyeX software installed
  • Python 3.8+

Installation

Using Conda (Recommended)

  1. Create and activate the conda environment:
conda env create -f environment.yml
conda activate tobii-gaze-server
  1. Install the package in development mode:
pip install -e .

Using pip

pip install tobii-gaze-server

Usage

Demo: Gaze-Controlled Mouse

The included demo moves your mouse cursor to where you look. A dwell-activated exit button allows you to quit without using the keyboard.

conda activate tobii-gaze-server
python examples/demo.py

Features:

  • Mouse cursor follows your gaze
  • Red X button in the top-right corner
  • Look at the X button for 1.5 seconds to exit
  • Automatically starts the gaze server (or uses an existing one)

Options:

  • --no-server: Don't auto-start the server (use if server is already running)
  • --url ws://host:port: Connect to a different server URL

Command Line

Start the server:

tobii-gaze-server

The server will start on ws://localhost:8887 by default.

As a Library

from tobii_gaze_server import TobiiGazeServer

server = TobiiGazeServer(host="localhost", port=8887)
server.run()

Environment Variables

  • TOBII_STREAM_ENGINE_DLL: Path to the Tobii Stream Engine DLL (default: C:\Program Files\Tobii\Tobii EyeX\tobii_stream_engine.dll)

WebSocket Protocol

Messages from Server

Gaze Data

{
    "type": "gaze",
    "x": 960.5,
    "y": 540.2
}

Status

{
    "type": "status",
    "connected": true,
    "mode": "GAZE",
    "message": "Tobii Stream Engine - Calibrated gaze data"
}

Messages to Server

Set Screen Size

{
    "action": "set_screen_size",
    "width": 1920,
    "height": 1080
}

License

MIT License - see LICENSE file for details.

Metadata

Release files for tobii-gaze-server 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tobii-gaze-server 0.2.0
File Size Uploaded
tobii_gaze_server-0.2.0.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tobii-gaze-server 0.2.0
File Interpreter ABI Platform
tobii_gaze_server-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / tobii_gaze_server-0.2.0.tar.gz

Download URL tobii_gaze_server-0.2.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0786fba9f9e1c51262c2eb586d6594fd3fee5e2c63c633436f46e8495fced6dd
BLAKE2b-256 checksum
How to use checksums
42ec0738157c03f08e71540a949a0f27f51824d078429f137b953389342dde71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / tobii_gaze_server-0.2.0-py3-none-any.whl

Download URL tobii_gaze_server-0.2.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ccf940232417f18ca23cb94f415459eb32537da7e63398352fd1a45f3ffe181
BLAKE2b-256 checksum
How to use checksums
c5dff7ff5ab36f913236d175305688b3c0ee1db8cc6a6addfe06afed716c495a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page