From cace46f6707d9ebd635090150d70b27b328e0708 Mon Sep 17 00:00:00 2001 From: Kevin Schweikert <54439512+kevinschweikert@users.noreply.github.com> Date: Tue, 22 Oct 2024 23:32:51 +0200 Subject: [PATCH] Fix example in README The correct module for `to_nx/1` is `Frame` not `Reader` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 66e654b..f37362f 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ serving = frames = Xav.Reader.stream!("sample.mp3", read: :audio, out_format: :f32, out_channels: 1, out_sample_rate: 16_000) |> Stream.take(200) - |> Enum.map(fn frame -> Xav.Reader.to_nx(frame) end) + |> Enum.map(fn frame -> Xav.Frame.to_nx(frame) end) batch = Nx.Batch.concatenate(frames) batch = Nx.Defn.jit_apply(&Function.identity/1, [batch])