Skip to content

Update react-native example to enable testing on a device. #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions evi-react-native-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This project features a sample implementation of Hume's [Empathic Voice Interfac

## Instructions

**Note:** This requires a Node version of 18.14 or greater.

1. Install and build
```shell
# Install dependencies
Expand All @@ -28,6 +30,22 @@ This project features a sample implementation of Hume's [Empathic Voice Interfac
npm run ios
```

### Running on your device

**Note:** This assumes you've already set up your [iOS device in Developer Mode](https://docs.expo.dev/get-started/set-up-your-environment/?platform=ios&device=physical&mode=development-build&buildEnv=local) and installed the corresponding simulator in XCode.

To run on your device:

1. Open `app.json` and edit the `ios.bundleIdentifier` value to be unique.

2. After running the "Install and build" step above, open `ios/EVIExample.xcworkspace` in XCode, select a development team in the Signing & Capabilities editor, and ensure the Signing Certificate is automatically set.

3. Run the dev server

```shell
npm run ios:device
```

## Notes
* **Echo cancellation**. Echo cancellation is important for a good user experience using EVI. Without echo cancellation, EVI will detect its own speech as user interruptions, and will cut itself off and become incoherent.
* Echo cancellation doesn't seem to work using the iOS simulator when forwarding audio from the host.
Expand Down
3 changes: 2 additions & 1 deletion evi-react-native-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"start": "expo start",
"ios": "expo run:ios",
"ios:device": "expo run:ios --device",
"web": "expo run:web",
"android": "expo run:android"
},
Expand All @@ -15,7 +16,7 @@
"hume": "^0.9.2",
"react": "18.3.1",
"react-dom": "18.2.0",
"react-native": "0.76.2",
"react-native": "0.76.7",
"react-native-web": "~0.19.13"
},
"devDependencies": {
Expand Down