|
1 |
| -# Hume Raw Text Processor |
| 1 | +<div align="center"> |
| 2 | + <img src="https://storage.googleapis.com/hume-public-logos/hume/hume-banner.png"> |
| 3 | + <h1>Expression Measurement | TypeScript Raw Text Processor</h1> |
| 4 | + <p> |
| 5 | + <strong>Batch-analyze Text using Hume's TypeScript SDK.</strong> |
| 6 | + </p> |
| 7 | +</div> |
2 | 8 |
|
3 |
| -## Summary |
| 9 | +## Overview |
4 | 10 |
|
5 | 11 | This project serves as an example implementation of our Expression Measurement (REST) API processing raw text using our [Typescript SDK](https://www.npmjs.com/package/hume).
|
6 | 12 |
|
7 | 13 | ## Running Locally
|
8 | 14 |
|
9 |
| -1. Clone the repo with `git clone origin https://github.com/HumeAI/hume-api-examples.git` |
| 15 | +1. Clone this examples repository: |
10 | 16 |
|
11 |
| -2. Navigate to project directory `cd typescript-raw-text-processor` |
| 17 | + ```shell |
| 18 | + git clone https://github.com/humeai/hume-api-examples |
| 19 | + cd hume-api-examples/expression-measurement/batch/typescript-raw-text-processor |
| 20 | + ``` |
12 | 21 |
|
13 |
| -3. Install dependencies with `npm i` |
| 22 | +2. Install dependencies: |
14 | 23 |
|
15 |
| -4. Setup environment variables |
| 24 | + ```shell |
| 25 | + npm install |
| 26 | + ``` |
16 | 27 |
|
17 |
| - a. Create `.env` file based off of `.env.example` |
| 28 | +3. Set up your API key: |
18 | 29 |
|
19 |
| - b. Copy/paste your API key in from the [Portal](https://beta.hume.ai/settings/keys). |
| 30 | + You must authenticate to use the Hume Expression Measurement 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). |
20 | 31 |
|
21 |
| -5. Set configurations within the `src/index.ts` file. |
| 32 | + This example uses [dotenv](https://www.npmjs.com/package/dotenv). Place your API key in a `.env` file at the root of your project. |
| 33 | + |
| 34 | + ```shell |
| 35 | + echo "HUME_API_KEY='<YOUR API KEY>'" > .env |
| 36 | + ``` |
| 37 | + |
| 38 | + You can copy the `.env.example` file to use as a template. |
| 39 | + |
| 40 | +4. Set configurations within the `src/index.ts` file. |
22 | 41 |
|
23 | 42 | a. Specify which language.
|
24 | 43 |
|
25 | 44 | b. Copy and paste the text to be processed.
|
26 | 45 |
|
27 | 46 | c. Set Language Model configurations.
|
28 | 47 |
|
29 |
| -6. Run `npm run start` to process the specified text with the specified configurations and log predictions to the console. |
| 48 | +5. Run `npm run start` to process the specified text with the specified configurations and log predictions to the console. |
0 commit comments