Skip to content

Overview

Warning

This is a draft of rocd documentation. The project is work-in-progress and has not been released yet.

Preface

rocd is a real-time audio streaming daemon that integrates audio devices and other audio sources and destinations across the network into a system where they can be orchestrated together in a wide variety of different ways.

rocd is a part of the Roc Streaming ecosystem. It is built on top of Roc Toolkit, a library for real-time audio transport, offering features such as Forward Erasure Correction codes (FEC), adaptive latency tuning, clock drift compensation, lossy and lossless codecs, and more.

rocd incorporates Roc Toolkit for the transport part, ZeroMQ for the P2P signaling protocol, and implements high-level orchestration on top of that. Everything is wrapped into a simple REST API that you can use in your application.

Features

  • Isolates complexities of real-time streaming and audio I/O in a high-performant daemon with HTTP API.

    You can use any platform (e.g. Node.js or Python) without any special requirements. The real-time path, sensitive to latency and performance, is fully enclosed within the daemon.

  • Encapsulates the hassle of P2P interactions and implements unified orchestration.

    After choosing a topology and configuring rocd instances, you can orchestrate the entire system via any instance (with sufficient privileges). You don't need to worry about low-level details like discovery, NAT traversal, distributed transactions, etc.

  • Inherits real-time features provided by Roc Toolkit.

    Roc Toolkit enables streaming of HD-quality audio with fixed or bounded latency and high robustness to packet loss. It is suitable for both low-latency, low-jitter networks like Ethernet and high-jitter unreliable networks like Wi-Fi and Internet.

  • Supports network topology of your choice.

    You can choose between a fully peer-to-peer setup, a central server for discovery and NAT traversal, central hub/mixer/transcoder, etc. rocd doesn't impose a specific topology and allows you to build your own.

  • Provides an easy-to-use REST API for:

    • Managing audio streams

      You can interconnect audio sources (like microphones or virtual speakers) and destinations (like speakers) across all rocd instances.

    • Managing audio devices

      You can read and write persistent configuration for both local and remote audio devices across rocd instances.

    • Managing virtual devices (VADs)

      You can create and configure Virtual Audio Devices (VADs) on local and remote instances. For example, you can create virtual speakers on one computer, and tell it to stream all audio played to it to speakers on another computer.

    • Metrics and events

      You can also collect metrics and subscribe to events across rocd instances.

Platforms

Info

Platforms marked with 🚧 are not supported yet. See Platform support for status.

rocd aims to support the following platforms:

  • Desktop — Computers with a display, sound card, and local apps doing audio I/O. Can be ✅ Linux, ✅ macOS, or 🚧 Windows status.

  • Mobile devices — ✅ Android and 🚧 iOS status.

    For mobile platforms, we ship rocd as an embeddable service wrapped into platform-native library (Kotlin or Swift). When you integrate this library into your app, it becomes a full-featured rocd instance.

  • Embedded Linux — ✅ Computers similar to PC, probably with a sound card, but often with constrained resources and no display.

  • Server Linux — ✅ Computers similar to PC, but typically without sound card and display. Intended to host software in a proxy/hub mode.

Use cases

TODO

Applications

  • Roc Cast is an open-source end-user application for Home Audio and AOIP, built on top of rocd.

    For details on how the two projects are integrated, see Relation to Roc Cast.