Automatic Speech Recognition
Transformers
Safetensors
phi4_multimodal
any-to-any
nlp
code
audio
speech-summarization
speech-translation
phi-4-multimodal
phi
phi-4-mini
custom_code
Instructions to use JacobLinCool/phi-4-audio with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JacobLinCool/phi-4-audio with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="JacobLinCool/phi-4-audio", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("JacobLinCool/phi-4-audio", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("JacobLinCool/phi-4-audio", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| {% for message in messages %}{{ '<|' + message['role'] + '|>' }}{% if message['content'] is string %}{{ message['content'] }}{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' %}{{ '<|image|>' }}{% elif content['type'] == 'audio' %}{{ '<|audio|>' }}{% elif content['type'] == 'text' %}{{ content['text'] }}{% endif %}{% endfor %}{% endif %}{% if message['role'] == 'system' and 'tools' in message and message['tools'] is not none %}{{ '<|tool|>' + message['tools'] + '<|/tool|>' + '<|end|>' }}{% endif %}{{ '<|end|>' }}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %} |