Skip to content

Commit 3eecacf

Browse files
committed
updated toggleNumerals to a generic configure function to match python sdk
1 parent 99b2854 commit 3eecacf

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/transcription/liveTranscription.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import EventEmitter from "events";
22
import querystring from "querystring";
33
import WebSocket from "ws";
44
import { ConnectionState, LiveTranscriptionEvents } from "../enums";
5-
import { LiveTranscriptionOptions } from "../types";
5+
import { LiveTranscriptionOptions, ToggleConfigOptions } from "../types";
66
import { userAgent } from "../userAgent";
77

88
export class LiveTranscription extends EventEmitter {
@@ -48,13 +48,11 @@ export class LiveTranscription extends EventEmitter {
4848
};
4949
}
5050

51-
public toggleNumerals(toggle: boolean): void {
51+
public configure(config: ToggleConfigOptions): void {
5252
this._socket.send(
5353
JSON.stringify({
5454
type: "Configure",
55-
processors: {
56-
numerals: toggle,
57-
},
55+
processors: config,
5856
})
5957
);
6058
}

src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export * from "./scopeList";
2929
export * from "./search";
3030
export * from "./sentence";
3131
export * from "./summary";
32+
export * from "./toggleConfigOptions";
3233
export * from "./topic";
3334
export * from "./topicGroup";
3435
export * from "./transcriptionSource";

src/types/toggleConfigOptions.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export type ToggleConfigOptions = {
2+
numerals: boolean;
3+
};

0 commit comments

Comments
 (0)