GAIA_benchmark_agent / src /tools /audio_processing_tools.py
gabriel-melki
Reorganize project structure: move files to src/ directory and remove old files
2ee9679
raw
history blame contribute delete
363 Bytes
from whisper import load_model
from smolagents.tools import tool
# TODO: Add a tool to ask a question about an audio
@tool
def ask_question_about_audio(question: str, path_to_audio: str) -> str:
"""
Ask a question about an audio and return the answer.
"""
model = load_model("base")
res = model.transcribe(path_to_audio)
return res["text"]