Skip to content

Commit

Permalink
upstream .pcm file uses different settings not worth investigating to…
Browse files Browse the repository at this point in the history
…night

Signed-off-by: Dave Lee <[email protected]>
  • Loading branch information
dave-gray101 committed Nov 29, 2024
1 parent d2009e1 commit 5912f53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/e2e-aio/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5912f53

Please sign in to comment.