Skip to content

Commit 32f8992

Browse files
Fix links to example projects in the README (#156)
1 parent 280e176 commit 32f8992

File tree

14 files changed

+433
-423
lines changed

14 files changed

+433
-423
lines changed

Diff for: evi/evi-flutter/README.md

+32-30
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,63 @@
55

66
This project features a sample implementation of Hume's [Empathic Voice Interface](https://dev.hume.ai/docs/empathic-voice-interface-evi/overview) using Flutter. This is lightly adapted from the stater project provided by `flutter create`.
77

8-
**Targets:** The example supports iOS, Android, and Web.
8+
**Targets:** The example supports iOS, Android, and Web.
99

10-
**Dependencies:** It uses the [record](https://pub.dev/packages/record) Flutter package for audio recording, and [audioplayers](https://pub.dev/packages/audioplayers) package for playback.
10+
**Dependencies:** It uses the [record](https://pub.dev/packages/record) Flutter package for audio recording, and [audioplayers](https://pub.dev/packages/audioplayers) package for playback.
1111

1212
## Instructions
1313

1414
1. Clone this examples repository:
1515

16-
```shell
17-
git clone https://github.com/humeai/hume-api-examples
18-
cd hume-api-examples/evi/flutter/evi-flutter
19-
```
16+
```shell
17+
git clone https://github.com/humeai/hume-api-examples
18+
cd hume-api-examples/evi/evi-flutter
19+
```
2020

2121
2. Install Flutter (if needed) following the [official guide](https://docs.flutter.dev/get-started/install).
2222

2323
3. Install dependencies:
24-
```shell
25-
flutter pub get
26-
```
24+
25+
```shell
26+
flutter pub get
27+
```
2728

2829
4. Set up your API key:
2930

30-
You must authenticate to use the EVI API. Your API key can be retrieved from the [Hume AI platform](https://platform.hume.ai/settings/keys). For detailed instructions, see our documentation on [getting your api keys](https://dev.hume.ai/docs/introduction/api-key).
31-
32-
This example uses [flutter_dotenv](https://pub.dev/packages/flutter_dotenv). Place your API key in a `.env` file at the root of your project.
31+
You must authenticate to use the EVI API. Your API key can be retrieved from the [Hume AI platform](https://platform.hume.ai/settings/keys). For detailed instructions, see our documentation on [getting your api keys](https://dev.hume.ai/docs/introduction/api-key).
32+
33+
This example uses [flutter_dotenv](https://pub.dev/packages/flutter_dotenv). Place your API key in a `.env` file at the root of your project.
3334

34-
```shell
35-
echo "HUME_API_KEY=your_api_key_here" > .env
36-
```
37-
38-
You can copy the `.env.example` file to use as a template.
35+
```shell
36+
echo "HUME_API_KEY=your_api_key_here" > .env
37+
```
3938

40-
**Note:** the `HUME_API_KEY` environment variable is for development only. In a production flutter app you should avoid building your api key into the app -- the client should fetch an access token from an endpoint on your server. You should supply the `MY_SERVER_AUTH_URL` environment variable and uncomment the call to `fetchAccessToken` in `lib/main.dart`.
39+
You can copy the `.env.example` file to use as a template.
40+
41+
**Note:** the `HUME_API_KEY` environment variable is for development only. In a production flutter app you should avoid building your api key into the app -- the client should fetch an access token from an endpoint on your server. You should supply the `MY_SERVER_AUTH_URL` environment variable and uncomment the call to `fetchAccessToken` in `lib/main.dart`.
4142

4243
5. Specify an EVI configuration (Optional):
4344

44-
EVI is pre-configured with a set of default values, which are automatically applied if you do not specify a configuration. The default configuration includes a preset voice and language model, but does not include a system prompt or tools. To customize these options, you will need to create and specify your own EVI configuration. To learn more, see our [configuration guide](https://dev.hume.ai/docs/empathic-voice-interface-evi/configuration/build-a-configuration).
45+
EVI is pre-configured with a set of default values, which are automatically applied if you do not specify a configuration. The default configuration includes a preset voice and language model, but does not include a system prompt or tools. To customize these options, you will need to create and specify your own EVI configuration. To learn more, see our [configuration guide](https://dev.hume.ai/docs/empathic-voice-interface-evi/configuration/build-a-configuration).
4546

46-
```shell
47-
echo "HUME_CONFIG_ID=your_config_id_here" >> .env
48-
```
47+
```shell
48+
echo "HUME_CONFIG_ID=your_config_id_here" >> .env
49+
```
4950

5051
6. Run the app:
51-
```shell
52-
flutter run
53-
```
52+
53+
```shell
54+
flutter run
55+
```
5456

5557
7. If you are using the Android emulator, make sure to send audio to the emulator from the host.
5658

5759
![](host-audio-screenshot.png)
5860

5961
## Notes
6062

61-
* **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. This flutter example *requests* echo cancellation from the browser or the device's operating system, but echo cancellation is hardware-dependent and may not be provided in all environments.
62-
* Echo cancellation works consistently on physical iOS devices and on the web.
63-
* Echo cancellation works on some physical Android devices.
64-
* Echo cancellation doesn't seem to work using the iOS simulator or Android Emulator when forwarding audio from the host.
65-
* If you need to test using a simulator or emulator, or in an environment where echo cancellation is not provided, use headphones, or enable the mute button while EVI is speaking.
63+
- **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. This flutter example _requests_ echo cancellation from the browser or the device's operating system, but echo cancellation is hardware-dependent and may not be provided in all environments.
64+
- Echo cancellation works consistently on physical iOS devices and on the web.
65+
- Echo cancellation works on some physical Android devices.
66+
- Echo cancellation doesn't seem to work using the iOS simulator or Android Emulator when forwarding audio from the host.
67+
- If you need to test using a simulator or emulator, or in an environment where echo cancellation is not provided, use headphones, or enable the mute button while EVI is speaking.

Diff for: evi/evi-next-js-app-router-quickstart/README.md

+30-29
Original file line numberDiff line numberDiff line change
@@ -22,49 +22,50 @@ Below are the steps to completing deployment:
2222
1. Create a Git Repository for your project.
2323
2. Provide the required environment variables. To get your API key and Secret key, log into the Hume AI Platform and visit the [API keys page](https://platform.hume.ai/settings/keys).
2424

25-
## Modify the project
25+
## Modify the project
2626

2727
1. Clone this examples repository:
2828

29-
```shell
30-
git clone https://github.com/humeai/hume-api-examples
31-
cd hume-api-examples/evi/next-js/evi-next-js-app-router-quickstart
32-
```
29+
```shell
30+
git clone https://github.com/humeai/hume-api-examples
31+
cd hume-api-examples/evi/evi-next-js-app-router-quickstart
32+
```
3333

3434
2. Install dependencies:
35-
```shell
36-
npm install
37-
```
35+
36+
```shell
37+
npm install
38+
```
3839

3940
3. Set up your API key and Secret key:
4041

41-
In order to make an authenticated connection we will first need to generate an access token. Doing so will require your API key and Secret key. These keys can be obtained by logging into the Hume AI Platform and visiting the [API keys page](https://platform.hume.ai/settings/keys). For detailed instructions, see our documentation on [getting your api keys](https://dev.hume.ai/docs/introduction/api-key).
42-
43-
Place your `HUME_API_KEY` and `HUME_SECRET_KEY` in a `.env` file at the root of your project.
42+
In order to make an authenticated connection we will first need to generate an access token. Doing so will require your API key and Secret key. These keys can be obtained by logging into the Hume AI Platform and visiting the [API keys page](https://platform.hume.ai/settings/keys). For detailed instructions, see our documentation on [getting your api keys](https://dev.hume.ai/docs/introduction/api-key).
43+
44+
Place your `HUME_API_KEY` and `HUME_SECRET_KEY` in a `.env` file at the root of your project.
4445

45-
```shell
46-
echo "HUME_API_KEY=your_api_key_here" > .env
47-
echo "HUME_SECRET_KEY=your_secret_key_here" >> .env
48-
```
46+
```shell
47+
echo "HUME_API_KEY=your_api_key_here" > .env
48+
echo "HUME_SECRET_KEY=your_secret_key_here" >> .env
49+
```
4950

50-
You can copy the `.env.example` file to use as a template.
51+
You can copy the `.env.example` file to use as a template.
5152

5253
4. Specify an EVI configuration (Optional):
5354

5455
EVI is pre-configured with a set of default values, which are automatically applied if you do not specify a configuration. The default configuration includes a preset voice and language model, but does not include a system prompt or tools. To customize these options, you will need to create and specify your own EVI configuration. To learn more, see our [configuration guide](https://dev.hume.ai/docs/empathic-voice-interface-evi/configuration/build-a-configuration).
55-
56-
You may pass in a configuration ID to the `VoiceProvider` object inside the [components/Chat.tsx file](https://github.com/HumeAI/hume-api-examples/blob/main/evi/next-js/evi-next-js-app-router-quickstart/components/Chat.tsx).
5756

58-
Here's an example:
59-
```tsx
60-
<VoiceProvider
61-
configId="YOUR_CONFIG_ID"
62-
auth={{ type: "accessToken", value: accessToken }}
63-
>
64-
```
57+
You may pass in a configuration ID to the `VoiceProvider` object inside the [components/Chat.tsx file](https://github.com/HumeAI/hume-api-examples/blob/main/evi/next-js/evi-next-js-app-router-quickstart/components/Chat.tsx).
6558

66-
5. Run the project:
67-
```shell
68-
npm run dev
69-
```
59+
Here's an example:
7060

61+
```tsx
62+
<VoiceProvider
63+
configId="YOUR_CONFIG_ID"
64+
auth={{ type: "accessToken", value: accessToken }}
65+
>
66+
```
67+
68+
5. Run the project:
69+
```shell
70+
npm run dev
71+
```

Diff for: evi/evi-next-js-function-calling/README.md

+51-49
Original file line numberDiff line numberDiff line change
@@ -13,85 +13,87 @@ See the [Tool Use guide](https://dev.hume.ai/docs/empathic-voice-interface-evi/f
1313

1414
1. [Create a tool](https://dev.hume.ai/docs/empathic-voice-interface-evi/tool-use#create-a-tool) with the following payload:
1515

16-
```json
17-
{
18-
"name": "get_current_weather",
19-
"description": "This tool is for getting the current weather.",
20-
"parameters": "{ \"type\": \"object\", \"properties\": { \"location\": { \"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\" }, \"format\": { \"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"], \"description\": \"The temperature unit to use. Infer this from the users location.\" } }, \"required\": [\"location\", \"format\"] }"
21-
}
22-
```
16+
```json
17+
{
18+
"name": "get_current_weather",
19+
"description": "This tool is for getting the current weather.",
20+
"parameters": "{ \"type\": \"object\", \"properties\": { \"location\": { \"type\": \"string\", \"description\": \"The city and state, e.g. San Francisco, CA\" }, \"format\": { \"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"], \"description\": \"The temperature unit to use. Infer this from the users location.\" } }, \"required\": [\"location\", \"format\"] }"
21+
}
22+
```
2323

2424
2. [Create a configuration](https://dev.hume.ai/docs/empathic-voice-interface-evi/tool-use#create-a-configuration) equipped with that tool:
2525

26-
```json
27-
{
28-
"name": "Weather Assistant Config",
29-
"language_model": {
30-
"model_provider": "ANTHROPIC",
31-
"model_resource": "claude-3-5-sonnet-20240620",
32-
},
33-
"tools": [
34-
{
35-
"id": "<YOUR_TOOL_ID>",
36-
"version": 0
37-
}
38-
]
39-
}
40-
```
26+
```json
27+
{
28+
"name": "Weather Assistant Config",
29+
"language_model": {
30+
"model_provider": "ANTHROPIC",
31+
"model_resource": "claude-3-5-sonnet-20240620"
32+
},
33+
"tools": [
34+
{
35+
"id": "<YOUR_TOOL_ID>",
36+
"version": 0
37+
}
38+
]
39+
}
40+
```
4141

4242
## Instructions
4343

4444
1. Clone this examples repository:
4545

46-
```shell
47-
git clone https://github.com/humeai/hume-api-examples
48-
cd hume-api-examples/evi/next-js/evi-next-js-function-calling
49-
```
46+
```shell
47+
git clone https://github.com/humeai/hume-api-examples
48+
cd hume-api-examples/evi/evi-next-js-function-calling
49+
```
5050

5151
2. Install dependencies:
52-
```shell
53-
pnpm install
54-
```
52+
53+
```shell
54+
pnpm install
55+
```
5556

5657
3. Set up your API key and Secret key:
5758

58-
In order to make an authenticated connection we will first need to generate an access token. Doing so will require your API key and Secret key. These keys can be obtained by logging into the Hume AI Platform and visiting the [API keys page](https://platform.hume.ai/settings/keys). For detailed instructions, see our documentation on [getting your api keys](https://dev.hume.ai/docs/introduction/api-key).
59-
60-
Place your `HUME_API_KEY` and `HUME_SECRET_KEY` in a `.env` file at the root of your project.
59+
In order to make an authenticated connection we will first need to generate an access token. Doing so will require your API key and Secret key. These keys can be obtained by logging into the Hume AI Platform and visiting the [API keys page](https://platform.hume.ai/settings/keys). For detailed instructions, see our documentation on [getting your api keys](https://dev.hume.ai/docs/introduction/api-key).
60+
61+
Place your `HUME_API_KEY` and `HUME_SECRET_KEY` in a `.env` file at the root of your project.
6162

62-
```shell
63-
echo "HUME_API_KEY=your_api_key_here" > .env
64-
echo "HUME_SECRET_KEY=your_secret_key_here" >> .env
65-
```
63+
```shell
64+
echo "HUME_API_KEY=your_api_key_here" > .env
65+
echo "HUME_SECRET_KEY=your_secret_key_here" >> .env
66+
```
6667

67-
You can copy the `.env.example` file to use as a template.
68+
You can copy the `.env.example` file to use as a template.
6869

6970
4. Add your Config ID to the `.env` file. This ID is from the EVI configuration you created earlier that includes your weather tool.
7071

71-
```shell
72-
echo "NEXT_PUBLIC_HUME_CONFIG_ID=your_config_id_here" >> .env
73-
```
72+
```shell
73+
echo "NEXT_PUBLIC_HUME_CONFIG_ID=your_config_id_here" >> .env
74+
```
7475

7576
5. Add the Geocoding API key to the `.env` file. You can obtain it for free from [geocode.maps.co](https://geocode.maps.co/).
7677

77-
```shell
78-
echo "GEOCODING_API_KEY=your_geocoding_api_key_here" >> .env
79-
```
78+
```shell
79+
echo "GEOCODING_API_KEY=your_geocoding_api_key_here" >> .env
80+
```
8081

8182
6. Run the project:
82-
```shell
83-
pnpm run dev
84-
```
8583

86-
This will start the Next.js development server, and you can access the application at `http://localhost:3000`.
84+
```shell
85+
pnpm run dev
86+
```
87+
88+
This will start the Next.js development server, and you can access the application at `http://localhost:3000`.
8789

8890
## Example Conversation
8991

9092
Here's an example of how you might interact with the EVI to get weather information:
9193

92-
*User: "What's the weather like in New York City?"*
94+
_User: "What's the weather like in New York City?"_
9395

94-
*EVI: (Uses the get_current_weather tool to fetch data) "Currently in New York City, it's 72°F (22°C) and partly cloudy. The forecast calls for a high of 78°F (26°C) and a low of 65°F (18°C) today."*
96+
_EVI: (Uses the get_current_weather tool to fetch data) "Currently in New York City, it's 72°F (22°C) and partly cloudy. The forecast calls for a high of 78°F (26°C) and a low of 65°F (18°C) today."_
9597

9698
## License
9799

Diff for: evi/evi-next-js-pages-router-quickstart/README.md

+23-24
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,39 @@ Below are the steps to completing deployment:
2222
1. Create a Git Repository for your project.
2323
2. Provide the required environment variables. To get your API key and Secret key, log into the Hume AI Platform and visit the [API keys page](https://platform.hume.ai/settings/keys).
2424

25-
## Modify the project
25+
## Modify the project
2626

2727
1. Clone this examples repository:
2828

29-
```shell
30-
git clone https://github.com/humeai/hume-api-examples
31-
cd hume-api-examples/evi/next-js/evi-next-js-pages-router-quickstart
32-
```
29+
```shell
30+
git clone https://github.com/humeai/hume-api-examples
31+
cd hume-api-examples/evi/evi-next-js-pages-router-quickstart
32+
```
3333

3434
2. Install dependencies:
35-
```shell
36-
pnpm install
37-
```
35+
36+
```shell
37+
pnpm install
38+
```
3839

3940
3. Set up your API key and Secret key:
4041

41-
In order to make an authenticated connection we will first need to generate an access token. Doing so will require your API key and Secret key. These keys can be obtained by logging into the Hume AI Platform and visiting the [API keys page](https://platform.hume.ai/settings/keys). For detailed instructions, see our documentation on [getting your api keys](https://dev.hume.ai/docs/introduction/api-key).
42-
43-
Place your `HUME_API_KEY` and `HUME_SECRET_KEY` in a `.env` file at the root of your project.
42+
In order to make an authenticated connection we will first need to generate an access token. Doing so will require your API key and Secret key. These keys can be obtained by logging into the Hume AI Platform and visiting the [API keys page](https://platform.hume.ai/settings/keys). For detailed instructions, see our documentation on [getting your api keys](https://dev.hume.ai/docs/introduction/api-key).
43+
44+
Place your `HUME_API_KEY` and `HUME_SECRET_KEY` in a `.env` file at the root of your project.
4445

45-
```shell
46-
echo "HUME_API_KEY=your_api_key_here" > .env
47-
echo "HUME_SECRET_KEY=your_secret_key_here" >> .env
48-
```
46+
```shell
47+
echo "HUME_API_KEY=your_api_key_here" > .env
48+
echo "HUME_SECRET_KEY=your_secret_key_here" >> .env
49+
```
4950

50-
You can copy the `.env.example` file to use as a template.
51+
You can copy the `.env.example` file to use as a template.
5152

5253
4. Specify an EVI configuration (Optional):
5354

54-
EVI is pre-configured with a set of default values, which are automatically applied if you do not specify a configuration. The default configuration includes a preset voice and language model, but does not include a system prompt or tools. To customize these options, you will need to create and specify your own EVI configuration. To learn more, see our [configuration guide](https://dev.hume.ai/docs/empathic-voice-interface-evi/configuration/build-a-configuration).
55-
56-
You may pass in a configuration ID to the `VoiceProvider` object inside the [components/Chat.tsx file](https://github.com/HumeAI/hume-api-examples/blob/main/evi/next-js/evi-next-js-pages-router-quickstart/components/Chat.tsx).
55+
EVI is pre-configured with a set of default values, which are automatically applied if you do not specify a configuration. The default configuration includes a preset voice and language model, but does not include a system prompt or tools. To customize these options, you will need to create and specify your own EVI configuration. To learn more, see our [configuration guide](https://dev.hume.ai/docs/empathic-voice-interface-evi/configuration/build-a-configuration).
56+
57+
You may pass in a configuration ID to the `VoiceProvider` object inside the [components/Chat.tsx file](https://github.com/HumeAI/hume-api-examples/blob/main/evi/next-js/evi-next-js-pages-router-quickstart/components/Chat.tsx).
5758

5859
Here's an example:
5960
```tsx
@@ -64,8 +65,6 @@ Below are the steps to completing deployment:
6465
```
6566

6667
5. Run the project:
67-
```shell
68-
pnpm run dev
69-
```
70-
71-
68+
```shell
69+
pnpm run dev
70+
```

0 commit comments

Comments
 (0)