From 5912f531273be727b66d816dcda9a00a798a67f7 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Fri, 29 Nov 2024 00:50:00 -0500 Subject: [PATCH] upstream .pcm file uses different settings not worth investigating tonight Signed-off-by: Dave Lee --- tests/e2e-aio/e2e_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e-aio/e2e_test.go b/tests/e2e-aio/e2e_test.go index f896487a3bc..37361dd6284 100644 --- a/tests/e2e-aio/e2e_test.go +++ b/tests/e2e-aio/e2e_test.go @@ -233,17 +233,17 @@ var _ = Describe("E2E test", func() { Context("vad", func() { It("correctly", func() { modelName := "silero-vad" - downloadURL := "https://github.com/streamer45/silero-vad-go/raw/refs/heads/master/testfiles/samples.pcm" + downloadURL := "https://cdn.openai.com/whisper/draft-20220913a/micro-machines.wav" file, err := downloadHttpFile(downloadURL) Expect(err).ToNot(HaveOccurred()) fh, err := os.Open(file) Expect(err).ToNot(HaveOccurred()) d := wav.NewDecoder(fh) - buf, err := d.FullPCMBuffer() d.SampleRate = 16000 // TODO: not currently configurable in VAD, seems like a bug? Fix in next PR + buf, err := d.FullPCMBuffer() Expect(err).ToNot((HaveOccurred())) fBuf := buf.AsFloat32Buffer().Data - //fBuf = fBuf[len(fBuf)/256 : len(fBuf)/128] // Whole file is too long, attempting reduced length + fBuf = fBuf[len(fBuf)/256 : len(fBuf)/128] // Whole file is too long, attempting reduced length req := schema.VADRequest{ BasicModelRequest: schema.BasicModelRequest{ Model: modelName,