Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.94 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.94 KB
LiveKit logo

Swift Voice Assistant

Deploy a sandbox appLiveKit Agents DocsLiveKit CloudBlog

A simple example AI voice assistant using the LiveKit Swift SDK.

This example is made for iOS, iPadOS, macOS, and visionOS.

Installation

Using the LiveKit CLI

The easiest way to get started is to use the LiveKit CLI. Run the following command to bootstrap this template:

lk app create --template voice-assistant-swift [--sandbox <sandboxID>]

Then follow instructions to set up an agent for your app to talk to.

Manual Installation

Clone the repository and then either create a VoiceAssistant/.env.xcconfig with a LIVEKIT_SANDBOX_ID (if using a hosted Token Server via Sandboxes), or open TokenService.swift and add your manually generated URL and token.

Then follow instructions to set up an agent for your app to talk to.

Token Generation

In production, you will want to host your own token server to generate tokens in order for users of your app to join LiveKit rooms. But while prototyping, you can either hardcode your token, or use a hosted Token Server via Sandboxes).

Agent

This example app requires an AI agent to communicate with. You can use one of our example agents in livekit-examples, or create your own following one of our agent quickstarts.