From 104f672ee5cc5cce814185dc70bacf0670bad6b7 Mon Sep 17 00:00:00 2001 From: SBrandeis Date: Wed, 8 Jan 2025 11:04:26 +0100 Subject: [PATCH] fix test + update tapes --- packages/inference/test/HfInference.spec.ts | 5 ++--- packages/inference/test/tapes.json | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/packages/inference/test/HfInference.spec.ts b/packages/inference/test/HfInference.spec.ts index cbab9e241..7a6840003 100644 --- a/packages/inference/test/HfInference.spec.ts +++ b/packages/inference/test/HfInference.spec.ts @@ -862,13 +862,12 @@ describe.concurrent( const res = await client.automaticSpeechRecognition({ model: "openai/whisper-large-v3", provider: "fal-ai", - data: new Blob([readTestFile("sample2.wav")], { type: "audio/vnd.wav" }), + data: new Blob([readTestFile("sample2.wav")], { type: "audio/x-wav" }), }); expect(res).toMatchObject({ - text: "HE HAS GRAVE DOUBTS WHETHER SIR FREDERICK LEIGHTON'S WORK IS REALLY GREEK AFTER ALL AND CAN DISCOVER IN IT BUT LITTLE OF ROCKY ITHACA", + text: "He has grave doubts whether Sir Frederick Leighton's work is really Greek after all, and can discover in it but little of rocky Ithaca.", }); }); }); }, - TIMEOUT ); diff --git a/packages/inference/test/tapes.json b/packages/inference/test/tapes.json index 2ba839463..eb3b2e24d 100644 --- a/packages/inference/test/tapes.json +++ b/packages/inference/test/tapes.json @@ -2354,5 +2354,24 @@ "vary": "Accept-Encoding" } } + }, + "a540c67dea61eb4a90fedc20699d4863b04fd61dca73756d1f31a09793307689": { + "url": "https://fal.run/fal-ai/wizper", + "init": { + "headers": { + "Content-Type": "application/json" + }, + "method": "POST" + }, + "response": { + "body": "{\"text\":\"He has grave doubts whether Sir Frederick Leighton's work is really Greek after all, and can discover in it but little of rocky Ithaca.\",\"chunks\":[{\"timestamp\":[0.36,9.62],\"text\":\"He has grave doubts whether Sir Frederick Leighton's work is really Greek after all, and can discover in it but little of rocky Ithaca.\"}]}", + "status": 200, + "statusText": "OK", + "headers": { + "connection": "keep-alive", + "content-type": "application/json", + "strict-transport-security": "max-age=31536000; includeSubDomains" + } + } } } \ No newline at end of file