fix: gate image tool and deepgram audio payload

This commit is contained in:
Peter Steinberger
2026-01-17 09:33:53 +00:00
parent d66bc65ca6
commit b6ea5895b6
9 changed files with 139 additions and 31 deletions

View File

@@ -31,21 +31,17 @@ async function fetchSampleBuffer(url: string, timeoutMs: number): Promise<Buffer
}
describeLive("deepgram live", () => {
it(
"transcribes sample audio",
async () => {
const buffer = await fetchSampleBuffer(SAMPLE_URL, 15000);
const result = await transcribeDeepgramAudio({
buffer,
fileName: "sample.wav",
mime: "audio/wav",
apiKey: DEEPGRAM_KEY,
model: DEEPGRAM_MODEL,
baseUrl: DEEPGRAM_BASE_URL,
timeoutMs: 20000,
});
expect(result.text.trim().length).toBeGreaterThan(0);
},
30000,
);
it("transcribes sample audio", async () => {
const buffer = await fetchSampleBuffer(SAMPLE_URL, 15000);
const result = await transcribeDeepgramAudio({
buffer,
fileName: "sample.wav",
mime: "audio/wav",
apiKey: DEEPGRAM_KEY,
model: DEEPGRAM_MODEL,
baseUrl: DEEPGRAM_BASE_URL,
timeoutMs: 20000,
});
expect(result.text.trim().length).toBeGreaterThan(0);
}, 30000);
});