audio_language_detection_processor#
- class baf.core.processors.audio_language_detection_processor.AudioLanguageDetectionProcessor(agent, transcription_model, llm_name)[source]#
Bases:
ProcessorThe AudioLanguageDetectionProcessor detects the spoken language in a given audio message.
This processor uses a speech-to-text model to transcribe audio and then leverages an LLM to predict the language. Ideally, you use a model that is trained for language detection, such as OpenAI’s GPT-4o-mini or anything that works well on a plethora of languages.
- Parameters:
agent (Agent) – The agent the processor belongs to.
transcription_model (Speech2Text) – The speech-to-text model to use for transcription.
llm_name (str) – The name of the LLM to use for language detection.
- _abc_impl = <_abc._abc_data object>#