Skip to content

Commit f343dd9

Browse files
committed
fix readme
1 parent c974e04 commit f343dd9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This SDK contains the APIs for expression measurement, empathic voice and custom
5353
if you do not plan on using more than one API to start, the SDK provides easy access in
5454
case you find additional APIs in the future.
5555

56-
Each category is namespaced:
56+
Each API is namespaced accordingly:
5757

5858
```typescript
5959
import { HumeClient } from "hume";
@@ -71,8 +71,8 @@ hume.emapthicVoice. // APIs specific to Empathic Voice
7171
The SDK supports interacting with both WebSocket and REST APIs.
7272

7373
### Request-Reply
74-
The expression measurement SDK supports a request-reply pattern,
75-
where you can send text and wait till the model provides a result.
74+
The SDK supports a request-reply pattern for the streaming expression measurement API.
75+
You'll be able to pass an inference request and `await` till the response is received.
7676

7777
```typescript
7878
import { HumeClient } from "hume";
@@ -92,7 +92,9 @@ for (const sample of samples) {
9292
```
9393

9494
### Empathic Voice
95-
The empathic voice API is also accessible via the SDK.
95+
The SDK supports sending and receiving audio from Empathic Voice. If you're
96+
running with Node.js you can also import our `ffplay` function which will
97+
play the audio for you.
9698

9799
```typescript
98100
import { HumeClient, ffplay } from "hume";
@@ -123,7 +125,7 @@ a subclass of [HumeError](./src/errors/HumeError.ts) will be thrown:
123125
import { HumeError, HumeTimeoutError } from "hume";
124126

125127
try {
126-
await hume.expressionMeasurement.batch.submitJob(/* ... */);
128+
await hume.expressionMeasurement.batch.startInferenceJob(/* ... */);
127129
} catch (err) {
128130
if (err instanceof HumeTimeoutError) {
129131
console.log("Request timed out", err);
@@ -142,7 +144,7 @@ try {
142144
You can use the maxRetries option to configure this behavior:
143145

144146
```typescript
145-
await hume.expressionMeasurement.batch.submitJob(..., {
147+
await hume.expressionMeasurement.batch.startInferenceJob(..., {
146148
maxRetries: 0, // disable retries
147149
});
148150
```
@@ -153,7 +155,7 @@ By default, the SDK has a timeout of 60s. You can use the `timeoutInSeconds` opt
153155
this behavior
154156

155157
```typescript
156-
await hume.expressionMeasurement.batch.submitJob(..., {
158+
await hume.expressionMeasurement.batch.startInferenceJob(..., {
157159
timeoutInSeconds: 10, // timeout after 10 seconds
158160
});
159161
```

0 commit comments

Comments
 (0)