1- # Hume TypeScript Library
2-
3- [ ![ npm shield] ( https://img.shields.io/npm/v/@fern-api/hume )] ( https://www.npmjs.com/package/@fern-api/hume )
4- [ ![ fern shield] ( https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen )] ( https://github.com/fern-api/fern )
5-
6- The Hume Node.js library provides access to the Hume API from JavaScript/TypeScript.
1+ <div align =" center " >
2+ <img src =" https://storage.googleapis.com/hume-public-logos/hume/hume-banner.png " >
3+ <h1 >Hume AI TypeScript SDK</h1 >
4+
5+ <p >
6+ <strong>Integrate Hume APIs directly into your Node application or frontend</strong>
7+ </p >
8+
9+ <br >
10+ <div >
11+ <a href="https://www.npmjs.com/package/@fern-api/hume"><img src="https://img.shields.io/npm/v/@fern-api/hume">
12+ <a href="https://buildwithfern.com/"><img src="https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen">
13+ </div >
14+ <br >
15+ </div >
716
817## Documentation
918
@@ -25,7 +34,7 @@ The SDK exports a batch client which you can use to hit our REST APIs.
2534import { HumeBatchClient } from " @fern-api/hume" ;
2635
2736const client = new HumeBatchClient ({
28- apiKey: " <your-api-key " ,
37+ apiKey: " YOUR_API_KEY " ,
2938});
3039
3140const job = await client .submitJob ({
@@ -47,21 +56,23 @@ The SDK exports a streaming client which you can use to hit our WebSocket APIs.
4756import { HumeStreamingClient } from " @fern-api/hume" ;
4857
4958const client = new HumeStreamingClient ({
50- apiKey: " <your-api-key " ,
59+ apiKey: " YOUR_API_KEY " ,
5160});
5261
5362const stream = await client .connect ({
5463 configs: {
55- face : {},
64+ language : {},
5665 },
57- listeners: {
58- message : (response ) => {
59- console .log (response .? burst );
60- },
66+ onMessage : ( response ) => {
67+ if (response . language != null ) {
68+ console .log (response .language . predictions );
69+ }
6170 },
6271});
6372
64- stream .sendFile (... );
73+ stream .sendText ({
74+ text: " Mary had a little lamb,"
75+ });
6576```
6677
6778## Errors
0 commit comments