Turn any open tab into an AI compute node
woolball-client establishes a connection between a user's browser and a running woolball-server instance. It utilizes WebSocket to receive job requests, executes the specified model locally using WebGPU or WASM, and transmits the outcome back to the server in real-time.
⚠️ Important: Before using this library, make sure you have the woolball-server running
| Provider | Task | Models | Status |
|---|---|---|---|
| Transformers.js | Speech-to-Text | ONNX Models | ✅ Implemented |
| Transformers.js | Text-to-Speech | ONNX Models | ✅ Implemented |
| Kokoro.js | Text-to-Speech | ONNX Models | ✅ Implemented |
| Transformers.js | Translation | ONNX Models | ✅ Implemented |
| Prompt API | Translation | Gemini Nano | 🧪 Experimental |
| Transformers.js | Text-Generation | ONNX Models | ✅ Implemented |
| WebLLM | Text Generation | MLC Models | ✅ Implemented |
| MediaPipe | Text Generation | LiteRT Models | ✅ Implemented |
| Prompt API | Text Generation | Gemini Nano | 🧪 Experimental |
| Transformers.js | Image-Text-to-Text | ONNX Models | |
| Prompt API | Image-Text-to-Text | Gemini Nano | 🧪 Experimental |
| API | Task | Description | Status |
|---|---|---|---|
| Canvas API | Character-to-Image | Converts a character to an image | ✅ Implemented |
| Canvas API | HTML-to-Image | Converts HTML content to an image | ✅ Implemented |
- Install the package:
npm install woolball-client- Import and use in your code:
import Woolball from 'woolball-client';
// Initialize with a client ID
const woolball = new Woolball('your-client-id', 'ws.server.com'); // ws://localhost:9003 by default
// Listen for task eventsSee the usage directory for a complete React-based web application example that demonstrates how to integrate the Woolball client into a web application.
A Chrome extension is available in the chrome-extension directory, allowing users to contribute their browser's computing resources to a Woolball server while browsing.
To build and use the Chrome extension:
# Build the Woolball client library
npm run build:all
# Install extension dependencies
cd chrome-extension
npm install
# Build the extension
npm run buildThen load the extension in Chrome from the chrome-extension/dist directory.
Simple demo pages are available in the demo directory:
# Serve the demo pages
npm run serve:demo# Install dependencies
npm install
# Build the library
npm run build:all
# Run tests
npm test
# Run end-to-end tests
npm run test:e2eThis project is licensed under the MPL-2.0 License - see the LICENSE file for details.