Skip to content

Commit fd9412a

Browse files
committed
keywords handling hotfix for api
1 parent cc29c82 commit fd9412a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/api/src/stt/deepgram/live.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ import { WsProxyConnection } from "../connection";
33

44
const CONTROL_MESSAGE_TYPES = new Set(["KeepAlive", "CloseStream", "Finalize"]);
55

6+
const IGNORED_PARAMS = new Set(["provider", "keywords", "keyterm", "keyterms"]);
7+
68
export const buildDeepgramUrl = (incomingUrl: URL) => {
79
const target = new URL("wss://api.deepgram.com/v1/listen");
810

911
incomingUrl.searchParams.forEach((value, key) => {
10-
if (key !== "provider") {
12+
if (!IGNORED_PARAMS.has(key)) {
1113
target.searchParams.set(key, value);
1214
}
1315
});
16+
1417
target.searchParams.set("model", "nova-3-general");
1518
target.searchParams.set("mip_opt_out", "false");
1619

0 commit comments

Comments
 (0)