For Developers & Tinkerers

Audio streaming,
powered by your code.

OST protocol, REST API, WebSocket, Prometheus metrics. Integrate open source network audio infrastructure into your project.

Set Up in 5 Minutes

Just install and launch. No configuration files needed.

# Install
curl -fsSL https://raw.githubusercontent.com/yukihamada/opensonic/main/web/install.sh | bash

# Start a transmitter node
opensonic tx --port 4400

# Start a receiver node (from another machine)
opensonic rx --connect 192.168.1.10:4400

# Check status via REST API
curl http://localhost:4400/api/status | jq

# Prometheus metrics
curl http://localhost:4400/metrics

API Endpoints

Fully controllable via RESTful API and WebSocket.

GET
/api/status

Get node status, connected peer count, and audio stream statistics.

GET
/api/peers

List of connected peers including latency, bandwidth usage, and connection time for each.

POST
/api/stream/start

Start an audio stream. Specify codec, bitrate, and channel count.

POST
/api/stream/stop

Stop the audio stream. Propagates stop signal to connected peers.

WS
/ws/audio

Real-time audio streaming via WebSocket. Supports browser playback.

GET
/metrics

Prometheus-format metrics output. Perfect for Grafana dashboard integration.

Architecture

Modular design built on a P2P mesh network.

DJ Software
DAW
System Audio
Microphone
OSTP Protocol Layer
Audio Capture
P2P Mesh
Codec Engine
REST API
WebSocket
Prometheus
iPhone
Raspberry Pi
Browser
Smart Speaker

Technology Stack

🔌

OST Protocol

Open Sonic Transport Protocol. An open protocol for low-latency P2P audio streaming.

UDP P2P NAT Traversal
🔧

Rust Core Engine

Memory-safe with zero-cost abstractions. A core engine optimized for real-time audio processing.

Rust tokio cpal
📊

Monitoring & Observability

Prometheus metrics output for seamless integration with Grafana dashboards.

Prometheus Grafana /metrics
🌐

Web Audio API

Receive and play audio via WebSocket from the browser. No plugins required.

WebSocket Web Audio PCM
🔐

Rights Management Engine

Automated track detection via audio fingerprinting and royalty calculation API.

Fingerprint Royalty API
📦

Cross-Platform

Runs on macOS, iOS, Android, Linux, and Raspberry Pi. Works on any device.

Swift Kotlin ARM

Receive Audio via WebSocket

Add audio playback to your browser with just a few lines of JavaScript.

// Receive and play audio stream via WebSocket
const ctx = new AudioContext({ sampleRate: 48000 });
const ws = new WebSocket('ws://localhost:4400/ws/audio');
ws.binaryType = 'arraybuffer';

ws.onmessage = (event) => {
  const pcm = new Float32Array(event.data);
  const buffer = ctx.createBuffer(2, pcm.length / 2, 48000);
  // De-interleave into channels
  const L = buffer.getChannelData(0);
  const R = buffer.getChannelData(1);
  for (let i = 0; i < L.length; i++) {
    L[i] = pcm[i * 2];
    R[i] = pcm[i * 2 + 1];
  }
  const src = ctx.createBufferSource();
  src.buffer = buffer;
  src.connect(ctx.destination);
  src.start();
};

Download Now

Available on all platforms. MIT License.

💻
Mac (.pkg)
macOS 12+
📱
iOS (TestFlight)
iPhone / iPad
🤖
Android (.apk)
Android 10+
🌐
Browser
Dashboard

Let's build it together, open source.

Soluna is community-driven. Issues, PRs, forks — all welcome.