Skip to content

pipecat-ai/rtvi-client-ios-daily

Repository files navigation

Daily Real-Time Voice Inference iOS SDK

RTVI-AI is an open standard for Real-Time Voice [and Video] Inference.

This library exports a VoiceClient that has the Daily transport associated.

Install

To depend on the client package, you can add this package via Xcode's package manager using the URL of this git repository directly, or you can declare your dependency in your Package.swift:

.package(url: "https://github.com/rtvi-ai/rtvi-client-ios-daily.git", from: "0.1.0"),

and add "RTVIClientIOSDaily" to your application/library target, dependencies, e.g. like this:

.target(name: "YourApp", dependencies: [
    .product(name: "RTVIClientIOSDaily", package: "rtvi-client-ios-daily")
],

Quick Start

Instantiate a VoiceClient instance, wire up the bot's audio, and start the conversation:

let clientConfigOptions = [
    ServiceConfig(
        service: "llm",
        options: [
            Option(name: "model", value: JSONValue.string("meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo")),
            Option(name: "messages", value: JSONValue.array([
                JSONValue.object([
                    "role" : JSONValue.string("system"),
                    "content": JSONValue.string("You are a assistant called ExampleBot. You can ask me anything. Keep responses brief and legible. Introduce yourself first.")
                ])
            ]))
        ]
    ),
    ServiceConfig(
        service: "tts",
        options: [
            Option(name: "voice", value: JSONValue.string("79a125e8-cd45-4c13-8a67-188112f4dd22"))
        ]
    )
]
let options = VoiceClientOptions.init(
    services: ["llm": "together", "tts": "cartesia"],
    config: clientConfigOptions
)

let defaultBackendURL = "http://192.168.1.23:7860/"
self.backendURL = defaultBackendURL

let rtviClientIOS = DailyVoiceClient.init(baseUrl: defaultBackendURL, options: options)

try await rtviClientIOS.start()

References

Contributing

We are welcoming contributions to this project in form of issues and pull request. For questions about RTVI head over to the Pipecat discord server and check the #rtvi channel.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published