@@ -52,7 +52,7 @@ If you'd prefer to use Google ASR, follow these [instructions for setting up Goo
52
52
53
53
▸ ** spokestackMiddleware** (): function
54
54
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 ) _
56
56
57
57
Express middleware for adding a proxy to the Spokestack GraphQL API.
58
58
A proxy is necessary to avoid exposing your Spokestack token secret on the client.
@@ -89,7 +89,7 @@ const graphQLFetcher = (graphQLParams) =>
89
89
90
90
▸ ** asrSocketServer** (` server ` : Server, ` asrConfig? ` : Omit<SpokestackASRConfig, \" sampleRate\"\> ): void
91
91
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 ) _
93
93
94
94
Adds a web socket server to the given HTTP server
95
95
to stream ASR using Spokestack ASR.
@@ -121,7 +121,7 @@ server.listen(port, () => {
121
121
122
122
▸ ** googleASRSocketServer** (` server ` : Server): void
123
123
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 ) _
125
125
126
126
Adds a web socket server to the given HTTP server
127
127
to stream ASR using Google Speech.
@@ -150,7 +150,7 @@ server.listen(port, () => {
150
150
151
151
▸ ** asr** (` content ` : string \| Uint8Array, ` sampleRate ` : number): Promise<string \| null\>
152
152
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 ) _
154
154
155
155
A one-off method for processing speech to text
156
156
using Spokestack ASR.
@@ -203,7 +203,7 @@ expressApp.post('/asr', fileUpload(), (req, res) => {
203
203
204
204
▸ ** googleASR** (` content ` : string \| Uint8Array, ` sampleRate ` : number): Promise<string \| null\>
205
205
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 ) _
207
207
208
208
A one-off method for processing speech to text
209
209
using Google Speech.
@@ -254,7 +254,7 @@ expressApp.post('/asr', fileUpload(), (req, res) => {
254
254
255
255
▸ ** encryptSecret** (` body ` : string): string
256
256
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 ) _
258
258
259
259
This is a convenience method for properly authorizing
260
260
requests to the Spokestack graphql API.
@@ -283,7 +283,7 @@ These functions are available exports from `spokestack/client`.
283
283
284
284
▸ ** record** (` config? ` : RecordConfig): Promise<AudioBuffer\>
285
285
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 ) _
287
287
288
288
A method to record audio for a given number of seconds
289
289
@@ -363,31 +363,31 @@ fetch('/asr', {
363
363
364
364
• ` Optional ` ** onProgress** : undefined \| (remaining: number) => void
365
365
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 ) _
367
367
368
368
A callback function to be called each second of recording.
369
369
370
370
##### onStart
371
371
372
372
• ` Optional ` ** onStart** : undefined \| () => void
373
373
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 ) _
375
375
376
376
A callback function to be called when recording starts
377
377
378
378
##### time
379
379
380
380
• ` Optional ` ** time** : undefined \| number
381
381
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 ) _
383
383
384
384
The total time to record. Default: 3
385
385
386
386
### startStream
387
387
388
388
▸ ** startStream** (` isPlaying ` : () => boolean): Promise<WebSocket, [ ProcessorReturnValue] \>
389
389
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 ) _
391
391
392
392
Returns a function to start recording using a native WebSocket.
393
393
This assumes the socket is hosted on the current server.
@@ -420,7 +420,7 @@ try {
420
420
421
421
▸ ** stopStream** (): void
422
422
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 ) _
424
424
425
425
Stop the current recording stream if one exists.
426
426
@@ -435,7 +435,7 @@ stopStream()
435
435
436
436
▸ ** convertFloat32ToInt16** (` fp32Samples ` : Float32Array): Int16Array
437
437
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 ) _
439
439
440
440
A utility method to convert Float32Array audio
441
441
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
466
466
467
467
▸ ** startProcessor** (): Promise<Error] \| [ null, [ ProcessorReturnValue] \>
468
468
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 ) _
470
470
471
471
Underlying utility method for recording audio,
472
472
used by the ` record ` and ` recordStream ` methods.
@@ -485,7 +485,7 @@ We'll switch to AudioWorklet when it does.
485
485
486
486
▸ ** stopProcessor** (): void
487
487
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 ) _
489
489
490
490
Underlying utility method to stop the current processor
491
491
if it exists and disconnect the microphone.
@@ -498,19 +498,19 @@ if it exists and disconnect the microphone.
498
498
499
499
• ** context** : AudioContext
500
500
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 ) _
502
502
503
503
##### processor
504
504
505
505
• ** processor** : ScriptProcessorNode
506
506
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 ) _
508
508
509
509
### concatenateAudioBuffers
510
510
511
511
▸ ** concatenateAudioBuffers** (` buffer1 ` : AudioBuffer \| null, ` buffer2 ` : AudioBuffer \| null, ` context ` : AudioContext): null \| AudioBuffer
512
512
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 ) _
514
514
515
515
A utility method to concatenate two AudioBuffers
516
516
@@ -528,7 +528,7 @@ A utility method to concatenate two AudioBuffers
528
528
529
529
▸ ** countdown** (` time ` : number, ` progress ` : (remaining: number) => void, ` complete ` : () => void): void
530
530
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 ) _
532
532
533
533
Countdown a number of seconds
534
534
0 commit comments