Skip to main content

[0.2.4] - 2026.11.24

The bundled C library is upgraded to 0.4.0. No API changes, so you can upgrade directly.

New

  • SDK logs are uploaded to the server automatically: after joining a channel, the SDK’s internal (C library) logs are tagged with the channel name and uid and uploaded to the server-side log service in batches in the background. Technical support can look them up directly by channel and user, so troubleshooting join failures, disconnections, subscription problems and the like no longer requires collecting logs from the server. On by default, uploading INFO and above; failed uploads are discarded and do not affect sending or receiving audio and video. Logs you write yourself through Python logging are not uploaded

Changes

  • Each log line the C library prints to stderr now carries two extra fields, channel=... and uid=..., so logs can be told apart by channel when one process is in several channels

[0.2.3] - 2026.11.21

The bundled C library is upgraded to 0.2.0. No API changes, so you can upgrade directly.

Fixes

  • Network connections leaked when joining or reconnecting failed: when the media connection couldn’t be established while joining (for example, the media node was at capacity or the connection timed out), or a reconnect after a disconnection failed, the connections already created were not closed. Each failure left behind UDP ports and memory, piling up in long-running services. Everything is now released on failure, and a failed join also tells the server to leave, so it no longer occupies a concurrency slot until the heartbeat times out
  • No notification after the media connection failed to reconnect: when the media connection dropped and reconnecting finally failed, on_disconnected wasn’t fired, so the program thought it was still in the channel while it could no longer send or receive audio and video. The SDK now leaves the channel and fires on_disconnected(ERROR, error); you can rejoin with a new token as described in Handling disconnects
  • Remote audio occasionally stalled for about 4 seconds, then burst in: when the sender lost one audio packet on the uplink, the receiver used to pause for about 4 seconds and then get the backlog all at once, noticeably affecting speech recognition and recording. Packet loss now only skips that frame, with no stall
  • No data after resubscribing once the network recovered: if an unsubscribe request didn’t reach the server because of a network problem, subscribing to the same track again reported success but on_audio_frame / on_video_frame never arrived. The SDK now sends the missing unsubscribe first and then subscribes again
  • Unsubscribing and then subscribing to the same track at the same moment didn’t take effect: the two operations used to cancel each other out. They are now executed in order
  • Couldn’t resubscribe after a subscription timed out: you can now retry directly after a timeout

[0.2.2] - 2026.11.05

The bundled C library is upgraded to 0.1.2. No API changes, so you can upgrade directly.

Fixes

  • ch.me.stream_tracks was always empty: the local user’s info didn’t include the tracks you published. It now contains them and updates right after publish_audio / unpublish

[0.2.1] - 2026.11.05

The bundled C library is upgraded to 0.1.1. No API changes, so you can upgrade directly.

Fixes

  • on_track_added could be missed when a remote user unpublished and immediately republished: when a remote user did “unpublish → republish” back to back, the SDK occasionally processed the two changes in reverse order and treated the new track as removed, so on_track_added never fired and the track couldn’t be subscribed. Signaling is now processed in arrival order, so tracks are no longer lost
  • User and track events could arrive out of order: previously a user’s on_track_added could arrive before their on_user_join, or on_track_removed for a track could arrive after the on_track_added of its republished track. These events are now called one at a time in the order the SDK receives the signaling; see Ordering and timing

[0.2.0] - 2026.09.30

This release unifies error codes across all SDKs and is a breaking change. The bundled C library is upgraded to 0.1.0.

Breaking changes

  • Error codes renumbered: the SDK’s own error codes in SdkError.code are now 180 + a 3-digit code shared across platforms, so the same kind of error has the same last three digits in every SRTC SDK; see Error codes. Failures that used to fall under 180000 (general error) or -1 (no error code) now have specific codes. If your code branches on error codes, update it according to the table below:
  • Error messages are now in English: SdkError.msg raised by the SDK itself, and the text of exceptions such as ImportError / RuntimeError, are now in English. Branch on code / base_code, not on the message text

Added

  • srtc.set_language(lang): sets the language (such as "en" or "zh-CN"). It applies process-wide and can be called at any time. It determines the language of msg for server business errors (code ≥1000); SDK errors are always in English. When it isn’t called, or None / an empty string is passed, the system language is used (environment variables LC_ALL → LC_MESSAGES → LANG). When the system language is C / POSIX or none of them is set, the server replies in Chinese, the same as earlier versions
  • srtc.ErrorCode: an enum of the 3-digit error codes shared across SDKs (such as ErrorCode.INVALID_ARGUMENT = 31)
  • SdkError.base_code: the last three digits of an SDK error code, for comparing with ErrorCode; server error codes return themselves

Fixed

  • Brief network outages made the SDK leave the channel: failed network requests were mistaken for server rejections, so heartbeat / reconnect gave up and left the channel without retrying. Network errors are now retried, and the SDK leaves only when the server explicitly rejects

[0.1.1] - 2026.09.26

Changed

  • The PyPI project page now has bilingual Chinese and English descriptions
  • Installation notes added: on Linux with glibc below 2.28 (such as CentOS 7), pin the dependency version with pip install srtc "av>=12,<14"
No changes to the API or behavior; you can upgrade directly from 0.1.0.

[0.1.0] - 2026.09.26

First release, published to PyPI: pip install srtc.

Added

  • Join / leave a channel, query users, tracks, and channel info, and auto-subscribe or subscribe manually
  • Remote audio decoded to PCM in a specified format, with DTX silence frames filled in based on RTP timestamps for a continuous timeline
  • Audio publishing: write PCM at any sample rate, and the SDK resamples, encodes, and sends it at real-time pace; clear() supports barge-in interruption, and write() has built-in backpressure
  • Remote video reception, optionally decoded to RGB images, with key frames requested automatically on decoding errors
  • Active speaker, network quality, layer switch, and custom message events; disconnect reasons distinguish being removed from the channel / replaced by another session with the same uid / the channel being destroyed
  • Two usage styles: frame-by-frame consumption with async for, and ChannelHandler callbacks
  • Built-in pipecat transport (pip install "srtc[pipecat]")
  • Platforms: Linux x86_64 / aarch64, macOS Apple Silicon, Windows x64, Python 3.10+
This version only supports receiving video, not publishing video.