The Pipecat Android SDK provides a Kotlin implementation for building voice and multimodal AI applications on Android. It handles:
  • Real-time audio and video streaming
  • Bot communication and state management
  • Media device handling
  • Event handling

Installation

Add the dependency for your chosen transport to your build.gradle file. For example, to use the Daily transport:
implementation "ai.pipecat:daily-transport:1.0.0"

Example

Here’s a simple example using Daily as the transport layer.
val callbacks = object : PipecatEventCallbacks() {

    override fun onBackendError(message: String) {
        Log.e(TAG, "Error from backend: $message")
    }

    // ...
}

val options = PipecatClientOptions(callbacks = callbacks)

val client: PipecatClientDaily = PipecatClient(DailyTransport(context), options)

// Kotlin coroutines:
client.startBotAndConnect(startBotParams).await()

// Or, callbacks:
client.startBotAndConnect(startBotParams).withCallback {
    // ...
}

Documentation