|
1 | | -# Welcome to your Expo app 👋 |
| 1 | +<img src="./.github/assets/app-icon.png" alt="Voice Assistant App Icon" width="100" height="100"> |
2 | 2 |
|
3 | | -This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). |
| 3 | +# React-Native Voice Assistant |
4 | 4 |
|
5 | | -## Get started |
| 5 | +This is a starter template for [LiveKit Agents](https://docs.livekit.io/agents/overview/) that provides a simple voice interface using the [LiveKit React-Native SDK](https://github.com/livekit/client-sdk-react-native) and [Expo Plugin](https://github.com/livekit/client-sdk-react-native-expo-plugin). |
6 | 6 |
|
7 | | -1. Install dependencies |
| 7 | +This template is free for you to use or modify as you see fit. |
8 | 8 |
|
9 | | - ```bash |
10 | | - npm install |
11 | | - ``` |
| 9 | +## Getting started |
12 | 10 |
|
13 | | -2. Start the app |
| 11 | +The easiest way to get this app running is with the [Sandbox for LiveKit Cloud](https://cloud.livekit.io/projects/p_/sandbox) and the [LiveKit CLI](https://docs.livekit.io/home/cli/cli-setup/). |
14 | 12 |
|
15 | | - ```bash |
16 | | - npx expo start |
17 | | - ``` |
| 13 | +First, create a new [Sandbox Token Server](https://cloud.livekit.io/projects/p_mytc7vpzfkt/sandbox/templates/token-server) for your LiveKit Cloud project. |
18 | 14 |
|
19 | | -In the output, you'll find options to open the app in a |
20 | | - |
21 | | -- [development build](https://docs.expo.dev/develop/development-builds/introduction/) |
22 | | -- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) |
23 | | -- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) |
24 | | -- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo |
25 | | - |
26 | | -You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). |
27 | | - |
28 | | -## Get a fresh project |
29 | | - |
30 | | -When you're ready, run: |
| 15 | +Then, run the following command to automatically clone this template and connect it to LiveKit Cloud: |
31 | 16 |
|
32 | 17 | ```bash |
33 | | -npm run reset-project |
| 18 | +lk app create --template voice-assistant-react-native --sandbox <token_server_sandbox_id> |
34 | 19 | ``` |
35 | 20 |
|
36 | | -This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing. |
| 21 | +Afterwards, run `npx expo install` to install dependencies, |
| 22 | +and then `npx expo start` from the command line to run the app. You can also use `npx expo run:android` or `npx expo run:ios` to run the app on the respective devices. |
37 | 23 |
|
38 | | -## Learn more |
| 24 | +You'll also need an agent to speak with. Try our sample voice assistant agent for [Python](https://github.com/livekit-examples/voice-pipeline-agent-python), [Node.js](https://github.com/livekit-examples/voice-pipeline-agent-node), or [create your own from scratch](https://docs.livekit.io/agents/quickstart/). |
39 | 25 |
|
40 | | -To learn more about developing your project with Expo, look at the following resources: |
| 26 | +> [!NOTE] |
| 27 | +> To setup without the LiveKit CLI, clone the repository and edit the `useConnectionDetails.ts` file to add either a `sandboxID` (if using a [Sandbox Token Server](https://cloud.livekit.io/projects/p_/sandbox/templates/token-server)), or a [manually generated](#token-generation) URL and token. |
41 | 28 |
|
42 | | -- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). |
43 | | -- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. |
| 29 | +## Token generation |
44 | 30 |
|
45 | | -## Join the community |
| 31 | +In a production environment, you will be responsible for developing a solution to [generate tokens for your users](https://docs.livekit.io/home/server/generating-tokens/) which is integrated with your authentication solution. You should disable your sandbox token server and modify `TokenExt.kt` to use your own token server. |
46 | 32 |
|
47 | | -Join our community of developers creating universal apps. |
| 33 | +## Contributing |
48 | 34 |
|
49 | | -- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. |
50 | | -- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. |
| 35 | +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](https://livekit.io/join-slack)! |
0 commit comments