Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { env } from "../env";
import { env } from "../../env";
import type {
BatchAlternatives,
BatchChannel,
BatchParams,
BatchResponse,
BatchResults,
BatchWord,
} from "./batch-types";
} from "../batch-types";

const ASSEMBLYAI_API_URL = "https://api.assemblyai.com/v2";
const POLL_INTERVAL_MS = 3000;
Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/stt/assemblyai/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { buildAssemblyAIUrl, createAssemblyAIProxy } from "./live";
export { transcribeWithAssemblyAI } from "./batch";
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { env } from "../env";
import { WsProxyConnection } from "./connection";
import { env } from "../../env";
import { WsProxyConnection } from "../connection";

const CONTROL_MESSAGE_TYPES = new Set(["Terminate"]);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { env } from "../env";
import type { BatchParams, BatchResponse } from "./batch-types";
import { env } from "../../env";
import type { BatchParams, BatchResponse } from "../batch-types";

const DEEPGRAM_BATCH_URL = "https://api.deepgram.com/v1/listen";

Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/stt/deepgram/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { buildDeepgramUrl, createDeepgramProxy } from "./live";
export { transcribeWithDeepgram } from "./batch";
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { env } from "../env";
import { WsProxyConnection } from "./connection";
import { env } from "../../env";
import { WsProxyConnection } from "../connection";

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

Expand Down
30 changes: 18 additions & 12 deletions apps/api/src/stt/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import { createAssemblyAIProxy } from "./assemblyai";
import { transcribeWithAssemblyAI } from "./batch-assemblyai";
import { transcribeWithDeepgram } from "./batch-deepgram";
import { transcribeWithSoniox } from "./batch-soniox";
import { createAssemblyAIProxy, transcribeWithAssemblyAI } from "./assemblyai";
import type { BatchParams, BatchProvider, BatchResponse } from "./batch-types";
import { WsProxyConnection } from "./connection";
import { createDeepgramProxy } from "./deepgram";
import { createSonioxProxy } from "./soniox";
import { createDeepgramProxy, transcribeWithDeepgram } from "./deepgram";
import { createSonioxProxy, transcribeWithSoniox } from "./soniox";

export { WsProxyConnection, type WsProxyOptions } from "./connection";
export { normalizeWsData, type WsPayload } from "./utils";
export { buildDeepgramUrl, createDeepgramProxy } from "./deepgram";
export { buildAssemblyAIUrl, createAssemblyAIProxy } from "./assemblyai";
export { buildSonioxUrl, createSonioxProxy } from "./soniox";
export {
buildDeepgramUrl,
createDeepgramProxy,
transcribeWithDeepgram,
} from "./deepgram";
export {
buildAssemblyAIUrl,
createAssemblyAIProxy,
transcribeWithAssemblyAI,
} from "./assemblyai";
export {
buildSonioxUrl,
createSonioxProxy,
transcribeWithSoniox,
} from "./soniox";
export type { BatchParams, BatchProvider, BatchResponse } from "./batch-types";
export { transcribeWithDeepgram } from "./batch-deepgram";
export { transcribeWithAssemblyAI } from "./batch-assemblyai";
export { transcribeWithSoniox } from "./batch-soniox";

export const UPSTREAM_URL_HEADER = "x-owh-upstream-url";
export const UPSTREAM_AUTH_HEADER = "x-owh-upstream-auth";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { env } from "../env";
import { env } from "../../env";
import type {
BatchAlternatives,
BatchChannel,
BatchParams,
BatchResponse,
BatchResults,
BatchWord,
} from "./batch-types";
} from "../batch-types";

const SONIOX_API_HOST = "api.soniox.com";
const POLL_INTERVAL_MS = 3000;
Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/stt/soniox/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { buildSonioxUrl, createSonioxProxy } from "./live";
export { transcribeWithSoniox } from "./batch";
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { env } from "../env";
import { WsProxyConnection } from "./connection";
import { env } from "../../env";
import { WsProxyConnection } from "../connection";

const CONTROL_MESSAGE_TYPES = new Set(["keepalive", "finalize"]);

Expand Down