> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini Live WebSocket Transport

> The Gemini Live WebSocket transport for the Pipecat iOS SDK: connect Swift apps directly to Google's Gemini Live service.

The Gemini Live Websocket transport implementation enables real-time audio communication with the Gemini Live service, using a direct websocket connection.

> [!NOTE]
>
> Transports of this type are designed primarily for development and testing
> purposes. For production applications, you will need to build a server
> component with a server-friendly transport, like the
> [DailyTransport](https://docs.pipecat.ai/api-reference/client/ios/transports/daily.md), to securely handle API keys.

## Installation

Add the Gemini transport package to your project:

```swift theme={null}
.package(url: "https://github.com/pipecat-ai/pipecat-client-ios-gemini-live-websocket.git", from: "0.3.1"),

// Add to your target dependencies
.target(name: "YourApp", dependencies: [
    .product(name: "PipecatClientIOSGeminiLiveWebSocket", package: "pipecat-client-ios-gemini-live-websocket")
],
```

## Usage

Create a client:

```swift theme={null}
let options: RTVIClientOptions = .init(
    params: .init(config: [
        .init(
            service: "llm",
            options: [
                .init(name: "api_key", value: .string("<your Gemini api key>")),
                .init(name: "initial_messages", value: .array([
                    .object([
                        "role": .string("user"), // "user" | "system"
                        "content": .string("I need your help planning my next vacation.")
                    ])
                ])),
                .init(name: "generation_config", value: .object([
                    "speech_config": .object([
                        "voice_config": .object([
                            "prebuilt_voice_config": .object([
                                "voice_name": .string("Puck") // "Puck" | "Charon" | "Kore" | "Fenrir" | "Aoede"
                            ])
                        ])
                    ])
                ]))
            ]
        )
    ])
)

let client = GeminiLiveWebSocketVoiceClient(options: options)

try await client.start()
```

## API Reference

> [card] [Demo](https://github.com/pipecat-ai/pipecat-client-ios-gemini-live-websocket-demo)
>
> Simple Chatbot Gemini Demo

> [card] [Source](https://github.com/pipecat-ai/pipecat-client-ios-gemini-live-websocket)
>
> iOS Gemini Live WebSocket

> [card] [Pipecat iOS Client Reference](https://docs-ios.pipecat.ai/PipecatClientIOSGeminiLiveWebSocket/documentation/pipecatclientiosgeminilivewebsocket)
>
> Complete API documentation for the Gemini transport implementation


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