Skip to content

Commit

Permalink
use default backend
Browse files Browse the repository at this point in the history
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
  • Loading branch information
kevinschweikert and jonatanklosko authored Oct 23, 2024
1 parent 1b6e128 commit 7b1c02f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/bumblebee/audio/speech_to_text_whisper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ defmodule Bumblebee.Audio.SpeechToTextWhisper do
out_channels: 1,
out_sample_rate: sampling_rate
)
|> Stream.map(fn frame -> Xav.Frame.to_nx(frame) end)
|> Stream.map(fn frame ->
Nx.with_default_backend(Nx.BinaryBackend, fn -> Xav.Frame.to_nx(frame) end)
end)
|> Stream.chunk_every(1000)
|> Stream.map(&Nx.Batch.concatenate/1)
|> Stream.map(fn batch -> Nx.Defn.jit_apply(&Function.identity/1, [batch]) end)
Expand Down

0 comments on commit 7b1c02f

Please sign in to comment.