Skip to content

livekit-examples/voice-assistant-react-native

Repository files navigation

Voice Assistant App Icon

React-Native Voice Assistant

This is a starter template for LiveKit Agents that provides a simple voice interface using the LiveKit React-Native SDK and Expo Plugin.

This template is free for you to use or modify as you see fit.

Getting started

The easiest way to get this app running is with the Sandbox for LiveKit Cloud and the LiveKit CLI.

First, create a new Sandbox Token Server for your LiveKit Cloud project.

Then, run the following command to automatically clone this template and connect it to LiveKit Cloud:

lk app create --template-url https://github.com./livekit-examples/voice-assistant-react-native --sandbox <token_server_sandbox_id>

Afterwards, move to the newly created folder and run the following commands:

npm install

# Android
npx expo run:android

# iOS
npx expo run:ios

You'll also need an agent to speak with. Try our sample voice assistant agent for Python, Node.js, or create your own from scratch.

Note

To setup without the LiveKit CLI, clone the repository and edit the hooks/useConnectionDetails.ts file to add either a sandboxID (if using a Sandbox Token Server), or a manually generated URL and token.

Token generation

In a production environment, you will be responsible for developing a solution to generate tokens for your users which is integrated with your authentication solution. You should disable your sandbox token server and modify hooks/useConnectionDetails.ts to use your own token server.

Contributing

This template is open source and we welcome contributions! Please open a PR or issue through GitHub, and don't forget to join us in the LiveKit Community Slack!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published