Build Android applications with Pipecat’s Kotlin client library
build.gradle
implementation "ai.pipecat:daily-transport:0.3.3"
clientConfig
val clientConfig = listOf( ServiceConfig( service = "llm", options = listOf( Option("model", "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"), Option("messages", Value.Array( Value.Object( "role" to Value.Str("system"), "content" to Value.Str("You are a helpful assistant.") ) )) ) ), ServiceConfig( service = "tts", options = listOf( Option("voice", "79a125e8-cd45-4c13-8a67-188112f4dd22") ) ) ) val callbacks = object : RTVIEventCallbacks() { override fun onBackendError(message: String) { Log.e(TAG, "Error from backend: $message") } } val options = RTVIClientOptions( services = listOf(ServiceRegistration("llm", "together"), ServiceRegistration("tts", "cartesia")), params = RTVIClientParams(baseUrl = "<your API url>", config = clientConfig) ) val client = RTVIClient(DailyTransport.Factory(context), callbacks, options) client.connect().await() // Using Coroutines // Or using callbacks: // client.start().withCallback { /* handle completion */ }