Skip to content

Commit 880e943

Browse files
authored
feat: add a method to send KeepAlive ws messages (#150)
Adds .keepAlive to the live transcription functionality, so that it is easier to send keepalive messages while waiting for audio data in live transcriptions
1 parent f330bdf commit 880e943

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/transcription/liveTranscription.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ export class LiveTranscription extends EventEmitter {
6868
);
6969
}
7070

71+
public keepAlive(): void {
72+
this._socket.send(
73+
JSON.stringify({
74+
type: "KeepAlive"
75+
})
76+
);
77+
}
78+
7179
/**
7280
* Returns the ready state of the websocket connection
7381
*/

0 commit comments

Comments
 (0)