from mlx_audio.stt.utils import load_model
model = load_model("mlx-community/Qwen2-Audio-7B-Instruct-4bit")
# Transcription
result = model.generate("audio.wav", prompt="Transcribe the audio.")
print(result.text)
# Audio understanding
result = model.generate("audio.wav", prompt="What emotion is the speaker expressing?")
print(result.text)
# Translation
result = model.generate("audio.wav", prompt="Translate the speech to French.")
print(result.text)