@@ -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/0075df2 /src/server/expressMiddleware.ts#L37 ) _
55+ _ Defined in [ server/expressMiddleware.ts:37] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/server/expressMiddleware.ts#L37 ) _
5656
5757Express middleware for adding a proxy to the Spokestack GraphQL API.
5858A proxy is necessary to avoid exposing your Spokestack token secret on the client.
@@ -87,9 +87,9 @@ const graphQLFetcher = (graphQLParams) =>
8787
8888### asrSocketServer
8989
90- ▸ ** asrSocketServer** (` server ` : Server, ` asrConfig? ` : Omit\ < SpokestackASRConfig, \" sampleRate\" >): void
90+ ▸ ** asrSocketServer** (` server ` : Server, ` asrConfig? ` : Omit<SpokestackASRConfig, \" sampleRate\"\ > ): void
9191
92- _ Defined in [ server/socketServer.ts:25] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/server/socketServer.ts#L25 ) _
92+ _ Defined in [ server/socketServer.ts:25] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/server/socketServer.ts#L25 ) _
9393
9494Adds a web socket server to the given HTTP server
9595to stream ASR using Spokestack ASR.
@@ -111,7 +111,7 @@ server.listen(port, () => {
111111| Name | Type | Default value |
112112| ----------- | ------------------------------------------ | ------------- |
113113| ` server ` | Server | - |
114- | ` asrConfig ` | Omit\ < SpokestackASRConfig, \" sampleRate\" > | {} |
114+ | ` asrConfig ` | Omit<SpokestackASRConfig, \" sampleRate\"\ > | {} |
115115
116116** Returns:** void
117117
@@ -121,7 +121,7 @@ server.listen(port, () => {
121121
122122▸ ** googleASRSocketServer** (` server ` : Server): void
123123
124- _ Defined in [ server/socketServer.ts:104 ] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/server/socketServer.ts#L104 ) _
124+ _ Defined in [ server/socketServer.ts:110 ] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/server/socketServer.ts#L110 ) _
125125
126126Adds a web socket server to the given HTTP server
127127to stream ASR using Google Speech.
@@ -148,9 +148,9 @@ server.listen(port, () => {
148148
149149### asr
150150
151- ▸ ** asr** (` content ` : string \| Uint8Array, ` sampleRate ` : number): Promise\ < string \| null>
151+ ▸ ** asr** (` content ` : string \| Uint8Array, ` sampleRate ` : number): Promise<string \| null\ >
152152
153- _ Defined in [ server/asr.ts:43] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/server/asr.ts#L43 ) _
153+ _ Defined in [ server/asr.ts:43] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/server/asr.ts#L43 ) _
154154
155155A one-off method for processing speech to text
156156using Spokestack ASR.
@@ -195,15 +195,15 @@ expressApp.post('/asr', fileUpload(), (req, res) => {
195195| ` content ` | string \| Uint8Array |
196196| ` sampleRate ` | number |
197197
198- ** Returns:** Promise\ < string \| null>
198+ ** Returns:** Promise<string \| null\ >
199199
200200---
201201
202202### googleASR
203203
204- ▸ ** googleASR** (` content ` : string \| Uint8Array, ` sampleRate ` : number): Promise\ < string \| null>
204+ ▸ ** googleASR** (` content ` : string \| Uint8Array, ` sampleRate ` : number): Promise<string \| null\ >
205205
206- _ Defined in [ server/asr.ts:97] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/server/asr.ts#L97 ) _
206+ _ Defined in [ server/asr.ts:97] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/server/asr.ts#L97 ) _
207207
208208A one-off method for processing speech to text
209209using Google Speech.
@@ -248,13 +248,13 @@ expressApp.post('/asr', fileUpload(), (req, res) => {
248248| ` content ` | string \| Uint8Array |
249249| ` sampleRate ` | number |
250250
251- ** Returns:** Promise\ < string \| null>
251+ ** Returns:** Promise<string \| null\ >
252252
253253### encryptSecret
254254
255255▸ ** encryptSecret** (` body ` : string): string
256256
257- _ Defined in [ server/encryptSecret.ts:13] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/server/encryptSecret.ts#L13 ) _
257+ _ Defined in [ server/encryptSecret.ts:13] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/server/encryptSecret.ts#L13 ) _
258258
259259This is a convenience method for properly authorizing
260260requests to the Spokestack graphql API.
@@ -281,9 +281,9 @@ These functions are available exports from `spokestack/client`.
281281
282282### record
283283
284- ▸ ** record** (` config? ` : RecordConfig): Promise\ < AudioBuffer>
284+ ▸ ** record** (` config? ` : RecordConfig): Promise<AudioBuffer\ >
285285
286- _ Defined in [ client/record.ts:84] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/client/record.ts#L84 ) _
286+ _ Defined in [ client/record.ts:84] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/record.ts#L84 ) _
287287
288288A method to record audio for a given number of seconds
289289
@@ -355,39 +355,39 @@ fetch('/asr', {
355355| -------- | ------------ | ------------- |
356356| ` config ` | RecordConfig | { time: 3 } |
357357
358- ** Returns:** Promise\ < AudioBuffer>
358+ ** Returns:** Promise<AudioBuffer\ >
359359
360360#### RecordConfig
361361
362362##### onProgress
363363
364364• ` Optional ` ** onProgress** : undefined \| (remaining: number) => void
365365
366- _ Defined in [ client/record.ts:16] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/client/record.ts#L16 ) _
366+ _ Defined in [ client/record.ts:16] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/record.ts#L16 ) _
367367
368368A 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/0075df2 /src/client/record.ts#L14 ) _
374+ _ Defined in [ client/record.ts:14] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/record.ts#L14 ) _
375375
376376A 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/0075df2 /src/client/record.ts#L12 ) _
382+ _ Defined in [ client/record.ts:12] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/record.ts#L12 ) _
383383
384384The total time to record. Default: 3
385385
386386### startStream
387387
388- ▸ ** startStream** (` isPlaying ` : () => boolean): Promise\ < WebSocket>
388+ ▸ ** startStream** (` isPlaying ` : () => boolean): Promise<WebSocket\ >
389389
390- _ Defined in [ client/recordStream.ts:29] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/client/recordStream.ts#L29 ) _
390+ _ Defined in [ client/recordStream.ts:29] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/recordStream.ts#L29 ) _
391391
392392Returns a function to start recording using a native WebSocket.
393393This assumes the socket is hosted on the current server.
@@ -412,15 +412,15 @@ try {
412412| ----------- | ------------- | ------------------------------------------------------------------------------------------------------------- |
413413| ` isPlaying ` | () => boolean | A function returning whether audio is currently playing. This is necessary to prevent recording played audio. |
414414
415- ** Returns:** Promise\ < WebSocket>
415+ ** Returns:** Promise<WebSocket\ >
416416
417417---
418418
419419### stopStream
420420
421421▸ ** stopStream** (): void
422422
423- _ Defined in [ client/recordStream.ts:79] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/client/recordStream.ts#L79 ) _
423+ _ Defined in [ client/recordStream.ts:79] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/recordStream.ts#L79 ) _
424424
425425Stop 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/0075df2 /src/client/convertFloat32ToInt16.ts#L16 ) _
438+ _ Defined in [ client/convertFloat32ToInt16.ts:16] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/convertFloat32ToInt16.ts#L16 ) _
439439
440440A utility method to convert Float32Array audio
441441to an Int16Array to be passed directly to Speech APIs
@@ -464,9 +464,9 @@ These are low-level functions for working with your own processors, available fr
464464
465465### startProcessor
466466
467- ▸ ** startProcessor** (): Promise\ < Error] \| [ null, [ ProcessorReturnValue] >
467+ ▸ ** startProcessor** (): Promise<Error] \| [ null, [ ProcessorReturnValue] \ >
468468
469- _ Defined in [ client/processor.ts:32] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/client/processor.ts#L32 ) _
469+ _ Defined in [ client/processor.ts:32] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/processor.ts#L32 ) _
470470
471471Underlying utility method for recording audio,
472472used by the ` record ` and ` recordStream ` methods.
@@ -477,15 +477,15 @@ See https://caniuse.com/#feat=mdn-api_audioworkletnode
477477
478478We'll switch to AudioWorklet when it does.
479479
480- ** Returns:** Promise\ < Error] \| [ null, [ ProcessorReturnValue] >
480+ ** Returns:** Promise<Error] \| [ null, [ ProcessorReturnValue] \ >
481481
482482---
483483
484484### stopProcessor
485485
486486▸ ** stopProcessor** (): void
487487
488- _ Defined in [ client/processor.ts:60] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/client/processor.ts#L60 ) _
488+ _ Defined in [ client/processor.ts:60] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/processor.ts#L60 ) _
489489
490490Underlying utility method to stop the current processor
491491if 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/0075df2 /src/client/processor.ts#L18 ) _
501+ _ Defined in [ client/processor.ts:18] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /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/0075df2 /src/client/processor.ts#L19 ) _
507+ _ Defined in [ client/processor.ts:19] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/processor.ts#L19 ) _
508508
509509### concatenateAudioBuffers
510510
511511▸ ** concatenateAudioBuffers** (` buffer1 ` : AudioBuffer, ` buffer2 ` : AudioBuffer, ` context ` : AudioContext): null \| AudioBuffer
512512
513- _ Defined in [ client/concatenateAudioBuffers.ts:4] ( https://github.com/spokestack/node-spokestack/blob/0075df2 /src/client/concatenateAudioBuffers.ts#L4 ) _
513+ _ Defined in [ client/concatenateAudioBuffers.ts:4] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/concatenateAudioBuffers.ts#L4 ) _
514514
515515A 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/0075df2 /src/client/countdown.ts#L7 ) _
531+ _ Defined in [ client/countdown.ts:7] ( https://github.com/spokestack/node-spokestack/blob/e2289b2 /src/client/countdown.ts#L7 ) _
532532
533533Countdown a number of seconds
534534
0 commit comments