chore: use Bumblebee.Audio.speech_to_text_whisper

The function `Bumblebee.Audio.speech_to_text/5` was deprecated on
release [0.4.0][1], and removed on release [0.5.0][2].

[1]: https://github.com/elixir-nx/bumblebee/releases/tag/v0.4.0
[2]: https://github.com/elixir-nx/bumblebee/releases/tag/v0.5.0
This commit is contained in:
Joao P Dubas 2024-10-29 23:44:11 +00:00
parent 82b6a7aca2
commit 887f5938b4
No known key found for this signature in database

View file

@ -9,10 +9,10 @@ defmodule LiveBeats.Application do
{:ok, whisper} = Bumblebee.load_model({:hf, "openai/whisper-tiny"}) {:ok, whisper} = Bumblebee.load_model({:hf, "openai/whisper-tiny"})
{:ok, featurizer} = Bumblebee.load_featurizer({:hf, "openai/whisper-tiny"}) {:ok, featurizer} = Bumblebee.load_featurizer({:hf, "openai/whisper-tiny"})
{:ok, tokenizer} = Bumblebee.load_tokenizer({:hf, "openai/whisper-tiny"}) {:ok, tokenizer} = Bumblebee.load_tokenizer({:hf, "openai/whisper-tiny"})
{:ok, generation_config} = Bumblebee.load_generation_config({:hf, "openai/whisper-tiny"})
Bumblebee.Audio.speech_to_text(whisper, featurizer, tokenizer, Bumblebee.Audio.speech_to_text_whisper(whisper, featurizer, tokenizer, generation_config,
compile: [batch_size: 1], compile: [batch_size: 1],
max_new_tokens: 100,
defn_options: [compiler: EXLA] defn_options: [compiler: EXLA]
) )
end end