I’ve tried to use batched_run with whisper and
it works infinitely:
children = [
{Nx.Serving,
serving: serving,
name: ServingWhisper,
batch_size: 5,
batch_timeout: 3000}
]
{:ok, _pid} = Supervisor.start_link(children, strategy: :one_for_one)
# output = Nx.Serving.batched_run(MyServingWhisper, [tensor])
output = Nx.Serving.batched_run(MyServingWhisper, {:file, "downloaded.wav"})
It works well with simple run, but doesn’t work with Supervisor and batched_run, I’ve tried files/tensors/batches, different batch_size, with and without chunk_num_seconds.
As i’ve read in docs " This serving always accepts a single input. A list of tensors is interpreted as continuous chunks. To transcribe multiple inputs concurrently use Nx.Serving.batched_run/2
." it should work with a list of tensors, but may be I’m doing smth wrong.