hf_speech2text#
- class besser.bot.nlp.speech2text.hf_speech2text.HFSpeech2Text(nlp_engine)[source]#
Bases:
Speech2Text
A Hugging Face Speech2Text.
It loads a Speech2Text Hugging Face model to perform the Speech2Text task.
Warning
Only tested with
openai/whisper-*
models- Parameters:
nlp_engine (NLPEngine) – the NLPEngine that handles the NLP processes of the bot
- _processor#
the model text processor
- _model#
the Speech2Text model
- _sampling_rate#
the sampling rate of audio data, it must coincide with the sampling rate used to train the model
- Type:
- _abc_impl = <_abc._abc_data object>#