Skip to content
This repository was archived by the owner on May 6, 2022. It is now read-only.

Commit 47dbb86

Browse files
committed
chore: release 2.0.0
1 parent 7555411 commit 47dbb86

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ If you'd prefer to use Google ASR, follow these [instructions for setting up Goo
5252

5353
**spokestackMiddleware**(): function
5454

55-
_Defined in [server/expressMiddleware.ts:37](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/server/expressMiddleware.ts#L37)_
55+
_Defined in [server/expressMiddleware.ts:37](https://github.com/spokestack/node-spokestack/blob/7555411/src/server/expressMiddleware.ts#L37)_
5656

5757
Express middleware for adding a proxy to the Spokestack GraphQL API.
5858
A proxy is necessary to avoid exposing your Spokestack token secret on the client.
@@ -89,7 +89,7 @@ const graphQLFetcher = (graphQLParams) =>
8989

9090
**asrSocketServer**(`server`: Server, `asrConfig?`: Omit<SpokestackASRConfig, \"sampleRate\"\>): void
9191

92-
_Defined in [server/socketServer.ts:25](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/server/socketServer.ts#L25)_
92+
_Defined in [server/socketServer.ts:25](https://github.com/spokestack/node-spokestack/blob/7555411/src/server/socketServer.ts#L25)_
9393

9494
Adds a web socket server to the given HTTP server
9595
to stream ASR using Spokestack ASR.
@@ -121,7 +121,7 @@ server.listen(port, () => {
121121

122122
**googleASRSocketServer**(`server`: Server): void
123123

124-
_Defined in [server/socketServer.ts:110](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/server/socketServer.ts#L110)_
124+
_Defined in [server/socketServer.ts:110](https://github.com/spokestack/node-spokestack/blob/7555411/src/server/socketServer.ts#L110)_
125125

126126
Adds a web socket server to the given HTTP server
127127
to stream ASR using Google Speech.
@@ -150,7 +150,7 @@ server.listen(port, () => {
150150

151151
**asr**(`content`: string \| Uint8Array, `sampleRate`: number): Promise<string \| null\>
152152

153-
_Defined in [server/asr.ts:43](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/server/asr.ts#L43)_
153+
_Defined in [server/asr.ts:43](https://github.com/spokestack/node-spokestack/blob/7555411/src/server/asr.ts#L43)_
154154

155155
A one-off method for processing speech to text
156156
using Spokestack ASR.
@@ -203,7 +203,7 @@ expressApp.post('/asr', fileUpload(), (req, res) => {
203203

204204
**googleASR**(`content`: string \| Uint8Array, `sampleRate`: number): Promise<string \| null\>
205205

206-
_Defined in [server/asr.ts:97](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/server/asr.ts#L97)_
206+
_Defined in [server/asr.ts:97](https://github.com/spokestack/node-spokestack/blob/7555411/src/server/asr.ts#L97)_
207207

208208
A one-off method for processing speech to text
209209
using Google Speech.
@@ -254,7 +254,7 @@ expressApp.post('/asr', fileUpload(), (req, res) => {
254254

255255
**encryptSecret**(`body`: string): string
256256

257-
_Defined in [server/encryptSecret.ts:13](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/server/encryptSecret.ts#L13)_
257+
_Defined in [server/encryptSecret.ts:13](https://github.com/spokestack/node-spokestack/blob/7555411/src/server/encryptSecret.ts#L13)_
258258

259259
This is a convenience method for properly authorizing
260260
requests to the Spokestack graphql API.
@@ -283,7 +283,7 @@ These functions are available exports from `spokestack/client`.
283283

284284
**record**(`config?`: RecordConfig): Promise<AudioBuffer\>
285285

286-
_Defined in [client/record.ts:84](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/record.ts#L84)_
286+
_Defined in [client/record.ts:84](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/record.ts#L84)_
287287

288288
A method to record audio for a given number of seconds
289289

@@ -363,31 +363,31 @@ fetch('/asr', {
363363

364364
`Optional` **onProgress**: undefined \| (remaining: number) => void
365365

366-
_Defined in [client/record.ts:16](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/record.ts#L16)_
366+
_Defined in [client/record.ts:16](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/record.ts#L16)_
367367

368368
A callback function to be called each second of recording.
369369

370370
##### onStart
371371

372372
`Optional` **onStart**: undefined \| () => void
373373

374-
_Defined in [client/record.ts:14](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/record.ts#L14)_
374+
_Defined in [client/record.ts:14](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/record.ts#L14)_
375375

376376
A callback function to be called when recording starts
377377

378378
##### time
379379

380380
`Optional` **time**: undefined \| number
381381

382-
_Defined in [client/record.ts:12](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/record.ts#L12)_
382+
_Defined in [client/record.ts:12](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/record.ts#L12)_
383383

384384
The total time to record. Default: 3
385385

386386
### startStream
387387

388388
**startStream**(`isPlaying`: () => boolean): Promise<WebSocket, [ProcessorReturnValue]\>
389389

390-
_Defined in [client/recordStream.ts:29](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/recordStream.ts#L29)_
390+
_Defined in [client/recordStream.ts:29](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/recordStream.ts#L29)_
391391

392392
Returns a function to start recording using a native WebSocket.
393393
This assumes the socket is hosted on the current server.
@@ -420,7 +420,7 @@ try {
420420

421421
**stopStream**(): void
422422

423-
_Defined in [client/recordStream.ts:80](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/recordStream.ts#L80)_
423+
_Defined in [client/recordStream.ts:80](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/recordStream.ts#L80)_
424424

425425
Stop the current recording stream if one exists.
426426

@@ -435,7 +435,7 @@ stopStream()
435435

436436
**convertFloat32ToInt16**(`fp32Samples`: Float32Array): Int16Array
437437

438-
_Defined in [client/convertFloat32ToInt16.ts:16](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/convertFloat32ToInt16.ts#L16)_
438+
_Defined in [client/convertFloat32ToInt16.ts:16](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/convertFloat32ToInt16.ts#L16)_
439439

440440
A utility method to convert Float32Array audio
441441
to an Int16Array to be passed directly to Speech APIs
@@ -466,7 +466,7 @@ These are low-level functions for working with your own processors, available fr
466466

467467
**startProcessor**(): Promise<Error] \| [null, [ProcessorReturnValue]\>
468468

469-
_Defined in [client/processor.ts:32](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/processor.ts#L32)_
469+
_Defined in [client/processor.ts:32](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/processor.ts#L32)_
470470

471471
Underlying utility method for recording audio,
472472
used by the `record` and `recordStream` methods.
@@ -485,7 +485,7 @@ We'll switch to AudioWorklet when it does.
485485

486486
**stopProcessor**(): void
487487

488-
_Defined in [client/processor.ts:60](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/processor.ts#L60)_
488+
_Defined in [client/processor.ts:60](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/processor.ts#L60)_
489489

490490
Underlying utility method to stop the current processor
491491
if it exists and disconnect the microphone.
@@ -498,19 +498,19 @@ if it exists and disconnect the microphone.
498498

499499
**context**: AudioContext
500500

501-
_Defined in [client/processor.ts:18](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/processor.ts#L18)_
501+
_Defined in [client/processor.ts:18](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/processor.ts#L18)_
502502

503503
##### processor
504504

505505
**processor**: ScriptProcessorNode
506506

507-
_Defined in [client/processor.ts:19](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/processor.ts#L19)_
507+
_Defined in [client/processor.ts:19](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/processor.ts#L19)_
508508

509509
### concatenateAudioBuffers
510510

511511
**concatenateAudioBuffers**(`buffer1`: AudioBuffer \| null, `buffer2`: AudioBuffer \| null, `context`: AudioContext): null \| AudioBuffer
512512

513-
_Defined in [client/concatenateAudioBuffers.ts:4](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/concatenateAudioBuffers.ts#L4)_
513+
_Defined in [client/concatenateAudioBuffers.ts:4](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/concatenateAudioBuffers.ts#L4)_
514514

515515
A utility method to concatenate two AudioBuffers
516516

@@ -528,7 +528,7 @@ A utility method to concatenate two AudioBuffers
528528

529529
**countdown**(`time`: number, `progress`: (remaining: number) => void, `complete`: () => void): void
530530

531-
_Defined in [client/countdown.ts:7](https://github.com/spokestack/node-spokestack/blob/6d2bf8c/src/client/countdown.ts#L7)_
531+
_Defined in [client/countdown.ts:7](https://github.com/spokestack/node-spokestack/blob/7555411/src/client/countdown.ts#L7)_
532532

533533
Countdown a number of seconds
534534

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spokestack",
3-
"version": "1.0.1",
3+
"version": "2.0.0",
44
"description": "Tools for integration with the Spokestack API in Node.js",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)