Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): enable AssemblyAI disfluencies in transcription options

Richie McIlroya61a8f6171b3
diff --git a/apps/web/__tests__/unit/transcribe-language.test.ts b/apps/web/__tests__/unit/transcribe-language.test.ts
index 505c4d1bf..c315acb73 100644
--- a/apps/web/__tests__/unit/transcribe-language.test.ts
+++ b/apps/web/__tests__/unit/transcribe-language.test.ts
@@ -27,6 +27,7 @@ describe("AI generation language support", () => {
speech_models: ["universal-3-5-pro", "universal-2"],
language_detection: true,
});
+ expect(options.disfluencies).toBe(true);
if (!("language_detection_options" in options)) {
throw new Error("Expected automatic language detection options");
}
@@ -39,6 +40,7 @@ describe("AI generation language support", () => {
expect(getAssemblyAITranscriptionOptions("ro")).toMatchObject({
speech_models: ["universal-3-5-pro", "universal-2"],
language_code: "ro",
+ disfluencies: true,
});
expect(getAssemblyAITranscriptionOptions("zh")).toMatchObject({
speech_models: ["universal-3-5-pro", "universal-2"],
diff --git a/apps/web/lib/assemblyai.ts b/apps/web/lib/assemblyai.ts
index 0a00797ec..0c743dc0f 100644
--- a/apps/web/lib/assemblyai.ts
+++ b/apps/web/lib/assemblyai.ts
@@ -44,6 +44,9 @@ export function getAssemblyAITranscriptionOptions(
speech_models: [...ASSEMBLYAI_SPEECH_MODELS],
format_text: true,
punctuate: true,
+ // Verbatim words: the single transcription pass feeds both the word-level
+ // edit transcript and the caption VTT (which strips fillers itself).
+ disfluencies: true,
};
if (language === AI_GENERATION_LANGUAGE_AUTO) {