Spaces:
Sleeping
Sleeping
gabriel-melki
Reorganize project structure: move files to src/ directory and remove old files
2ee9679
| from whisper import load_model | |
| from smolagents.tools import tool | |
| # TODO: Add a tool to ask a question about an audio | |
| 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"] |