> ## Documentation Index
> Fetch the complete documentation index at: https://daily-main.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Daily WebRTC Transport

> DailyTransport for the Pipecat C++ SDK: connects native apps to a bot's Daily room over WebRTC, e.g. bots on Pipecat Cloud.

`pipecat::DailyTransport` connects your C++ app to a Pipecat bot's [Daily](https://www.daily.co/) room, using WebRTC. The bot uses Daily's [server-side transport](/api-reference/server/services/transport/daily), like bots on Pipecat Cloud do.

It's part of the [C++ SDK](/api-reference/client/cpp/overview), and supports Linux (`x86_64` and `aarch64`), macOS (`aarch64`) and Windows (`x86_64`).

## Usage

Give a `pipecat::DailyTransport` to the client when you create it:

```cpp theme={null}
#include <pipecat/daily/transport.h>
#include <pipecat/pipecat.h>

int main() {
    App app;  // Your pipecat::PipecatClientCallbacks.

    pipecat::PipecatClientOptions options;
    options.transport = std::make_unique<pipecat::DailyTransport>();
    options.callbacks = &app;
    pipecat::PipecatClient client(std::move(options));

    // Start a bot on Pipecat Cloud in a new Daily room, and connect to it.
    pipecat::APIRequest request;
    request.endpoint = "https://api.pipecat.daily.co/v1/public/AGENT/start";
    request.headers = {{"Authorization", "Bearer " + api_key}};
    request.request_data = {{"createDailyRoom", true}};
    client.start_bot_and_connect(request);

    ...

    client.disconnect();
}
```

Then use the client as usual, see the [C++ SDK overview](/api-reference/client/cpp/overview#usage).

* The transport joins the bot's Daily room. Start endpoints like [Pipecat Cloud](/pipecat-cloud/fundamentals/active-sessions#using-rest) or Pipecat's [development runner](/api-reference/server/utilities/runner/guide) (`python bot.py -t daily`) create one when you ask with `createDailyRoom`. If you already have a room, connect to it directly with `client.connect({{"url", room_url}, {"token", token}})`.
* Audio is 16-bit PCM, 16 kHz mono by default. Change it with `pipecat::DailyTransportOptions`. The user's audio is sent without echo cancellation, so if you play the bot through speakers, use your platform's echo cancellation or headphones.
* Each client needs its own `DailyTransport`, and several clients can run at the same time, e.g. to talk to several bots.

## Installation

Besides what [the client needs](/api-reference/client/cpp/overview#installation), you need the [Daily Core C++ SDK](https://github.com/daily-co/daily-core-sdk) 0.23.0 or newer. Download it for your platform from its [releases](https://github.com/daily-co/daily-core-sdk/releases), unpack it, and point `DailyCore_ROOT` to it.

With `FetchContent`, turn the transport on before making the SDK available, and link `pipecat::daily`, which also links the client and Daily Core:

```cmake theme={null}
# With the FetchContent_Declare() from the C++ SDK overview.
set(PIPECAT_BUILD_DAILY ON)
FetchContent_MakeAvailable(pipecat)

target_link_libraries(my_app PRIVATE pipecat::daily)
```

Then configure your project with `-DDailyCore_ROOT=/path/to/daily-core-sdk`.

To build and install it yourself, add `-DPIPECAT_BUILD_DAILY=ON` when configuring the SDK:

<Tabs>
  <Tab title="Linux/macOS">
    ```bash theme={null}
    cmake . -G Ninja -Bbuild -DCMAKE_BUILD_TYPE=Release \
      -DPIPECAT_BUILD_DAILY=ON \
      -DDailyCore_ROOT=/path/to/daily-core-sdk
    ninja -C build
    cmake --install build --prefix /path/to/pipecat
    ```
  </Tab>

  <Tab title="Windows">
    ```bash theme={null}
    cmake --preset vcpkg -DPIPECAT_BUILD_DAILY=ON -DDailyCore_ROOT=C:/path/to/daily-core-sdk
    cmake --build build --config Release
    cmake --install build --config Release --prefix C:/path/to/pipecat
    ```
  </Tab>
</Tabs>

Then use it as a component of the package, with `DailyCore_ROOT` pointing to the Daily Core SDK:

```cmake theme={null}
find_package(pipecat 1.0 REQUIRED COMPONENTS daily)
target_link_libraries(my_app PRIVATE pipecat::daily)
```

<Note>
  Daily Core is a shared library, so ship it with your app. On Windows, put
  `daily_core.dll` next to your `.exe`. See [Shipping the
  library](https://github.com/daily-co/daily-core-sdk#shipping-the-library) in
  the Daily Core SDK's README.
</Note>

## Examples

The SDK's [text](https://github.com/pipecat-ai/pipecat-client-cxx/tree/main/examples/text) and [voice](https://github.com/pipecat-ai/pipecat-client-cxx/tree/main/examples/voice) examples use the Daily transport by default, with a bot on your machine or on Pipecat Cloud.

## Documentation

<CardGroup cols={2}>
  <Card title="API Reference" icon="book" href="/api-reference/client/cpp/api-reference">
    Includes `DailyTransport` and its options
  </Card>

  <Card title="Source" icon="github" href="https://github.com/pipecat-ai/pipecat-client-cxx/tree/main/transports/daily">
    The Daily transport on GitHub
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.