Skip to content

elevenlabs/components-swift

Repository files navigation

The ElevenLabs logo and an Orb.

Swift Components

A collection of Swift voice components.

Orb Visualizer

Orb Visualizer
OrbVisualizer(
  inputTrack: nil,
  outputTrack: nil,
  agentState: .listening,
  colors: (Color(hex: "CADCFC"), Color(hex: "A0B9D1"))
)
Orb visualizer with Swift usage example.

A SwiftUI view that visualizes audio levels and agent state as an animated Orb. Pass AudioTrack instances for real-time visualization, optional agentState to reflect status, and two Color values to customize the Orb.

Parameters

  • inputTrack: Optional AudioTrack used to visualize microphone/input levels.
  • outputTrack: Optional AudioTrack used to visualize agent/output levels.
  • agentState: AgentState controlling visual states (e.g., .listening, .thinking, .speaking).
  • colors: Tuple of two Color values to customize the orb gradient.

Docs

Conversational AI docs and guides: https://elevenlabs.io/docs/conversational-ai/overview

Example App

See our example app, to see how you can build cross-platform Apple voice experiences.


Installation

You can add ElevenLabsComponents to your project using Swift Package Manager.

In Xcode:

  1. Go to File > Add Packages...
  2. Enter the repository URL:
    https://github.com/elevenlabs/components-swift
    
  3. Select the main branch or a version, and add the ElevenLabsComponents library to your target.

Or add to your Package.swift:

dependencies: [
    .package(url: "https://github.com/elevenlabs/components-swift.git", from: "0.1.3")
]

What’s Included

This package provides a set of SwiftUI components for building real-time voice experiences with ElevenLabs Conversational AI, including an OrbVisualizer.

Acknowledgements

This project extends the LiveKit components-swift codebase under the same permissive license, with modifications tailored for ElevenLabs voice experiences. We are grateful for their foundational work, which has enabled further innovation in this space.

About

A collection of Swift voice components

Resources

License

Stars

Watchers

Forks

Packages

No packages published