Probe with tirn_probe_device
tirn_probe_device validates device-to-WHIP connection setup and the Echo audio path. It is an integration and diagnostic tool, not a production device SDK.
See tangeai/tirn-probe-device for source code, build requirements, and complete command documentation. Obtain the matching SDK from the TiRTC SDK download page, then run:
git clone https://github.com/tangeai/tirn-probe-device.git
cd tirn-probe-device
./script/build.sh --sdk-dir /absolute/path/to/tirtc-sdkThe script supports native macOS arm64 and Linux x86_64 builds. The binary is written to build/<platform>/tirn_probe_device.
Before starting, prepare:
- a registered device ID and device secret;
- the Echo service
peer_idand a valid token; - a
tirn_probe_devicebinary for the target platform.
See Run the quick-start example for connection parameters. Do not write secrets or tokens to logs.
Test audio and video
The media command sends built-in test audio and JPEG frames and checks the audio and video returned by Echo:
./build/linux-x86_64/tirn_probe_device media \
--device-id your_device_id \
--device-secret-key "$DEVICE_SECRET_KEY" \
--peer-id "$ECHO_PEER_ID" \
--token "$CONNECT_TOKEN" \
--audio-output /tmp/tirn-probe-echo.pcm \
--duration-sec 10The test passes when all four audio/video send and receive counters are greater than zero. The optional --audio-output argument saves received audio as raw 8 kHz, 16-bit, mono PCM.
Test connection setup
Run 20 connections and summarize success rate and latency:
./build/linux-x86_64/tirn_probe_device connect \
--device-id your_device_id \
--device-secret-key "$DEVICE_SECRET_KEY" \
--peer-id "$ECHO_PEER_ID" \
--token "$CONNECT_TOKEN" \
--iterations 20 \
--connect-timeout-ms 30000The result includes successes, failures, and P50, P90, P95, and P99 latency for successful connections. For failures, first check device registration, token expiry, the service name, and device network access.
Test audio
The audio command synchronizes the device and service clocks, sends built-in 440 Hz PCM audio, and receives the Echo response:
./build/linux-x86_64/tirn_probe_device audio \
--device-id your_device_id \
--device-secret-key "$DEVICE_SECRET_KEY" \
--peer-id "$ECHO_PEER_ID" \
--token "$CONNECT_TOKEN" \
--audio-iterations 3 \
--duration-sec 30 \
--frame-ms 40 \
--audio-sample-log /tmp/tirn-probe-audio-samples.csvTerminal output confirms sending, Echo reception, and time synchronization. When --audio-sample-log is set, the CSV retains raw per-frame timing data for further investigation of Echo rate, latency, frame intervals, and stalls.
To send recorded speech, add --audio-input <ogg-opus-file>. To retain the received Echo audio, also add --audio-echo-output <output.opus>.