Skip to main content

Python bindings for the Zoom RTMS C SDK - Real-Time Media Streaming

Project description

Zoom Realtime Media Streams (RTMS) SDK

Bindings for real-time audio, video, and transcript streams from Zoom Meetings

npm PyPI docs

Supported Products

The RTMS SDK works with multiple Zoom products:

See examples/ for complete guides and code samples.

Platform Support Status

Language Status Supported Platforms
Node.js ✅ Supported darwin-arm64, linux-x64
Python ✅ Supported darwin-arm64, linux-x64
Go 📅 Planned -

We are actively working to expand both language and platform support in future releases.

Overview

The RTMS SDK allows developers to:

  • Connect to live Zoom meetings
  • Process real-time media streams (audio, video, transcripts)
  • Receive events about session and participant updates
  • Build applications that interact with Zoom meetings in real-time
  • Handle webhook events with full control over validation and responses

Installation

Node.js

⚠️ Requirements: Node.js >= 22.0.0 (Node.js 24 LTS recommended)

The RTMS SDK uses N-API versions 9 and 10, which require Node.js 22.0.0 or higher.

# Check your Node.js version
node --version

# Install the package
npm install @zoom/rtms

Using NVM

If you're using an older version of Node.js:

# Using nvm (recommended)
nvm install 24       # Install Node.js 24 LTS (recommended)
nvm use 24

# Or install Node.js 22 LTS (minimum supported)
nvm install 22
nvm use 22

# Reinstall the package
npm install @zoom/rtms

Python

⚠️ Requirements: Python >= 3.10 (Python 3.10, 3.11, 3.12, or 3.13)

The RTMS SDK requires Python 3.10 or higher.

# Check your Python version
python3 --version

# Install from PyPI
pip install rtms

If you're using an older version of Python:

# Using pyenv (recommended)
pyenv install 3.12
pyenv local 3.12

# Or using your system's package manager
# Ubuntu/Debian: sudo apt install python3.12
# macOS: brew install python@3.12

Usage

Regardless of the language that you use the RTMS SDK follows the same basic steps:

  • Receive and validate the webhook event
  • Create an RTMS SDK Client
  • Assign data callbacks to that client
  • Join the meeting with the event payload

Configure

All SDK languages read from the environment or a .env file:

# Required - Your Zoom OAuth credentials
ZM_RTMS_CLIENT=your_client_id
ZM_RTMS_SECRET=your_client_secret

# Optional - Webhook server configuration
ZM_RTMS_PORT=8080
ZM_RTMS_PATH=/webhook

# Optional - Logging configuration
ZM_RTMS_LOG_LEVEL=debug          # error, warn, info, debug, trace
ZM_RTMS_LOG_FORMAT=progressive    # progressive or json
ZM_RTMS_LOG_ENABLED=true          # true or false

Node.js

For more details, see our Quickstart App

import rtms from "@zoom/rtms";

// CommonJS
// const rtms = require('@zoom/rtms').default;

rtms.onWebhookEvent(({event, payload}) => {
    if (event !== "meeting.rtms_started") return;

    const client = new rtms.Client();
    
    client.onAudioData((data, timestamp, metadata) => {
        console.log(`Received audio: ${data.length} bytes from ${metadata.userName}`);
    });

    client.join(payload);
});

Production note: The example above does not validate the incoming webhook signature. Zoom cryptographically signs every webhook — production apps must verify signatures before processing. See Webhook Validation

Python

For more details, see our Quickstart App

Environment Setup

Create a virtual environment and install dependencies:

# Create virtual environment
python3 -m venv .venv

# Activate virtual environment
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install python-dotenv

# Install RTMS SDK
pip install rtms

Quickstart

import rtms
from dotenv import load_dotenv

load_dotenv()

clients = {}


@rtms.on_webhook_event
def handle_webhook(webhook):
    event = webhook.get('event')
    payload = webhook.get('payload', {})
    stream_id = payload.get('rtms_stream_id')

    if event == 'meeting.rtms_stopped':
        client = clients.pop(stream_id, None)
        if client:
            client.leave()
        return

    if event != 'meeting.rtms_started':
        return

    client = rtms.Client()
    clients[stream_id] = client

    @client.on_transcript_data
    def _(data, _, timestamp, metadata):
        print(f'[transcript] ts={timestamp} user="{metadata.userName}": {data.decode()}')

    client.join(payload)


rtms.run()

Production note: The example above does not validate the incoming webhook signature. Zoom cryptographically signs every webhook — production apps must verify signatures before processing. See Webhook Validation

Troubleshooting

If you encounter issues some of these steps may help.

1. Segmentation Fault / Crash on Startup

Symptoms:

  • Immediate crash when requiring/importing the module
  • Error message: Segmentation fault (core dumped)
  • Stack trace shows napi_module_register_by_symbol

Root Cause: Using Node.js version < 22.0.0

Solution: See Using NVM

Prevention:

  • Always use Node.js 22.0.0 or higher
  • Use recommended version with .nvmrc: nvm use (Node.js 24 LTS)
  • Check version before installing: node --version

2. Platform Support

Verify you're using a supported platform (darwin-arm64 or linux-x64)

3. SDK Files

Ensure RTMS C++ SDK files are correctly placed in the appropriate lib directory

4. Build Mode

Try both debug and release modes (npm run debug or npm run release)

5. Dependencies

Verify all prerequisites are installed

6. Audio Defaults Mismatch

This SDK uses different default audio parameters than the raw RTMS WebSocket protocol for better out-of-the-box quality. If you need to match the WebSocket protocol defaults, see #92 for details.

7. Identifying Speakers with Mixed Audio Streams

When using AUDIO_MIXED_STREAM, the audio callback's metadata does not identify the current speaker since all participants are mixed into a single stream. To identify who is speaking, use the onActiveSpeakerEvent callback:

Node.js:

client.onActiveSpeakerEvent((timestamp, userId, userName) => {
    console.log(`Active speaker: ${userName} (${userId})`);
});

Python:

@client.onActiveSpeakerEvent
def on_active_speaker(timestamp, user_id, user_name):
    print(f"Active speaker: {user_name} ({user_id})")

This callback notifies your application whenever the active speaker changes in the meeting. You can also use the lower-level onEventEx function with the active speaker event type directly. See #80 for more details.

Building from Source

The RTMS SDK can be built from source using either Docker (recommended) or local build tools.

Using Docker (Recommended)

Prerequisites

  • Docker and Docker Compose
  • Zoom RTMS C++ SDK files (contact Zoom for access)
  • Task installed (or use Docker's Task installation)

Steps

# Clone the repository
git clone https://github.com/zoom/rtms.git
cd rtms

# Place your SDK library files in the lib/{arch} folder
# For linux-x64:
cp ../librtmsdk.0.2025xxxx/librtmsdk.so.0 lib/linux-x64

# For darwin-arm64 (Apple Silicon):
cp ../librtmsdk.0.2025xxxx/librtmsdk.dylib lib/darwin-arm64

# Place the include files in the proper directory
cp ../librtmsdk.0.2025xxxx/h/* lib/include

# Build using Docker Compose with Task
docker compose run --rm build task build:js    # Build Node.js for linux-x64
docker compose run --rm build task build:py    # Build Python wheel for linux-x64

# Or use convenience services
docker compose run --rm test-js                # Build and test Node.js
docker compose run --rm test-py                # Build and test Python

Docker Compose creates distributable packages for linux-x64 (prebuilds for Node.js, wheels for Python). Use this when developing on macOS to build Linux packages for distribution.

Building Locally

Prerequisites

  • Node.js (>= 22.0.0, LTS recommended)
  • Python 3.10+ with pip (for Python build)
  • CMake 3.25+
  • C/C++ build tools
  • Task (go-task) - https://taskfile.dev/installation/
  • Zoom RTMS C++ SDK files (contact Zoom for access)

Steps

# Install system dependencies
## macOS
brew install cmake go-task python@3.13 node@24

## Linux
sudo apt update
sudo apt install -y cmake python3-full python3-pip npm
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin

# Clone and set up the repository
git clone https://github.com/zoom/rtms.git
cd rtms

# Place SDK files in the appropriate lib directory
# lib/linux-x64/ or lib/darwin-arm64/

# Verify your environment meets requirements
task doctor

# Setup project (fetches SDK if not present, installs dependencies)
task setup

# Build for specific language and platform
task build:js             # Build Node.js for current platform
task build:js:linux       # Build Node.js for Linux (via Docker)
task build:js:darwin      # Build Node.js for macOS

task build:py             # Build Python for current platform
task build:py:linux       # Build Python wheel for Linux (via Docker)
task build:py:darwin      # Build Python wheel for macOS

Development Commands

The project uses Task (go-task) for build orchestration. Commands follow the pattern: task <action>:<lang>:<platform>

# See all available commands
task --list

# Verify environment
task doctor                   # Check Node, Python, CMake, Docker versions

# Setup project
task setup                    # Fetch SDK and install dependencies

# Build modes
BUILD_TYPE=Debug task build:js    # Build in debug mode
BUILD_TYPE=Release task build:js  # Build in release mode (default)

# Debug logging for C++ SDK callbacks
RTMS_DEBUG=ON task build:js       # Enable verbose callback logging

For Contributors

For detailed contribution guidelines, build instructions, and troubleshooting, see CONTRIBUTING.md.

For Maintainers

If you're a maintainer looking to build, test, or publish new releases of the RTMS SDK, please refer to PUBLISHING.md

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rtms-1.1.0-cp313-cp313-manylinux_2_34_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

rtms-1.1.0-cp313-cp313-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

rtms-1.1.0-cp312-cp312-manylinux_2_34_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

rtms-1.1.0-cp312-cp312-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

rtms-1.1.0-cp311-cp311-manylinux_2_34_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

rtms-1.1.0-cp311-cp311-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

rtms-1.1.0-cp310-cp310-manylinux_2_34_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

rtms-1.1.0-cp310-cp310-macosx_11_0_arm64.whl (8.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file rtms-1.1.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rtms-1.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 46bf6e2f132c3e0b99096a59fa0ee66f3717390861555344a67880366f4ad8a0
MD5 5053d45942f3c770c07964db82365a4f
BLAKE2b-256 10d69acd362600c701d4677921f273806be64dbd0ff0552068ca75a0236081e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtms-1.1.0-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on zoom/rtms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rtms-1.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rtms-1.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 818728a5e8175830a1fb85ae143324b3c3f14ca6cde7f0b054e8e4ceb302fe16
MD5 c633197b975b483ed156fe46d11d93ff
BLAKE2b-256 a937fbe71afe4fdd6930f9aabfc4474cf1153e1655167899f3c3d565f824d99c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtms-1.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on zoom/rtms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rtms-1.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rtms-1.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 70d935902b2c660a6bd21875b1d205f83e00426b28fc33f887637b52df9f56ed
MD5 7642307a576ad7e41ac0788f57a8fcc4
BLAKE2b-256 4f6e3febdf9107ad8213531b705a8e250092d3709927fff35eab161a9ce14fc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtms-1.1.0-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on zoom/rtms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rtms-1.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rtms-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0976aaac5fdfaa4f7b604beec750f4a48184fa193be211d54833c9abd7acf6b8
MD5 423f65bb959375bebd4fa5f0fb51d56e
BLAKE2b-256 2c74f7af5085ec375e61dfb88b343c7f307fffd80d1d891bb3f2c723382a701d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtms-1.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on zoom/rtms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rtms-1.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rtms-1.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0488309a4db9861e8dd4d1f07b3824e22e8c3556403d04ac3216018558556885
MD5 943955f044e5810e1f7a6a3a4ad9e66f
BLAKE2b-256 10ef8ae8722605674d243d6a27dc2b9c3e8b930351fa92bd09cad22dced1dc2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtms-1.1.0-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on zoom/rtms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rtms-1.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rtms-1.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 57a9fe855ed32070cbd7fb84076c189a834585a5e029222ecefaaca57f7efd5c
MD5 993abdff4e36bd40ec1c8998189be03e
BLAKE2b-256 86fad2c57cf3261f46008a7c0646d2019011478ddce99ebcafb5c790cedb4b36

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtms-1.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on zoom/rtms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rtms-1.1.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for rtms-1.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e1d6921c91fe2d6cf61a6d7ba229afc95f7322bf741bfa65565431234b65c859
MD5 6bae05c1c58c40adc7103c8ddea0ac1e
BLAKE2b-256 80fc0741c6787cd7f6d4f7054cd1506b56c0596400a3dcdd52a9a49bad4bdea9

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtms-1.1.0-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on zoom/rtms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rtms-1.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rtms-1.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9eef6f977a9c29ef6de1f008a02d057e667fe16a429998c6742b484a197cca88
MD5 fbe7df7c92a9af954b0ba799dd9fe7f2
BLAKE2b-256 1c29be27d51696d30a25e8fdeab9b3325256d8bbfbadc2e9631f00bcf0e717bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for rtms-1.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on zoom/rtms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page