You are viewing v1 docs. For the latest documentation, visit docs.agno.com
import requests from agno.agent import Agent from agno.media import Audio from agno.models.google import Gemini agent = Agent( model=Gemini(id="gemini-2.0-flash-exp"), markdown=True, ) url = "https://agno-public.s3.us-east-1.amazonaws.com/demo_data/QA-01.mp3" response = requests.get(url) audio_content = response.content agent.print_response( "Give a transcript of this audio conversation. Use speaker A, speaker B to identify speakers.", audio=[Audio(content=audio_content)], stream=True, )
Create a virtual environment
Terminal
python3 -m venv .venv source .venv/bin/activate
Set your API key
export GOOGLE_API_KEY=xxx
Install libraries
pip install google-genai
Run Agent
python cookbook/agent_concepts/multimodal/audio_to_text.py
Was this page helpful?