Skip to content

Commit

Permalink
Fix example in README (#18)
Browse files Browse the repository at this point in the history
The correct module for `to_nx/1` is `Frame` not `Reader`
  • Loading branch information
kevinschweikert authored Oct 23, 2024
1 parent 8cc159b commit b0e5dc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit b0e5dc7

Please sign in to comment.