Skip to content

pipecat-ai/rtvi-client-cxx-daily

Repository files navigation

Daily RTVI C++ client SDK

rtvi-client-cxx-daily is a C++ SDK to build native RTVI client applications with Daily.

It supports Linux (x86_64 and aarch64), macOS (aarch64) and Windows (x86_64).

For a quickstart check the Examples section below.

Dependencies

Daily Core C++ SDK

Daily RTVI C++ client SDK requires the Daily Core C++ SDK to be able to connect to Daily's infrastructure. You can download it from the available releases for your platform.

Then, define the following environment variable:

DAILY_CORE_PATH=/path/to/daily-core-sdk

RTVI C++ client SDK

It also requires the base RTVI C++ client SDK. Please, follow the instructions on that project to build it.

Then, define the following environment variable:

RTVI_SDK_PATH=/path/to/rtvi-client-cxx

Building

Before building the example we need to declare a few environment variables:

RTVI_SDK_PATH=/path/to/rtvi-client-cxx
DAILY_CORE_PATH=/path/to/daily-core-sdk

Linux and macOS

cmake . -G Ninja -Bbuild
ninja -C build

Windows

Initialize the command-line development environment.

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" amd64

And then configure and build:

cmake . -Bbuild --preset vcpkg
cmake --build build --config Release

Cross-compiling (Linux aarch64)

It is possible to build the example for the aarch64 architecture in Linux with:

cmake . -G Ninja -Bbuild -DCMAKE_TOOLCHAIN_FILE=aarch64-linux-toolchain.cmake
ninja -C build

Security

To avoid sharing API keys in the client (including the Daily Bots API key) or if you want to use your custom API keys for different services (e.g. OpenAI) you will need to deploy a custom web server to be a proxy to the Daily Bots API. This repo has a very simple server that you can use:

cd examples/server
npm install
node server.js

This will expose http://localhost:3000/start which is the URL you should use instead.

Examples

These are the list of available examples:

Quickstart (Linux and macOS)

The following are quickstart instructions for Linux and macOS. For Windows, go to one of the examples above for instructions.

The first thing to do is build the Daily RTVI C++ client library as described above:

export RTVI_SDK_PATH=/PATH/TO/rtvi-client-cxx
export DAILY_CORE_PATH=/PATH/TO/daily-core-sdk-X.Y.Z-PLATFORM
cmake . -G Ninja -Bbuild
ninja -C build

Then, just build one of the examples:

cd examples/c++-portaudio
export DAILY_RTVI_SDK_PATH=/PATH/TO/rtvi-client-c++-daily
cmake . -G Ninja -Bbuild
ninja -C build

Before running the example make sure you have your Daily Bots API key setup:

export DAILY_BOTS_API_KEY=...

Finally, you can just try:

./build/example_audio -b https://api.daily.co/v1/bots/start -c config.json

Releases

No releases published

Packages

No packages published