audio_file = agent.run("Tell me a joke and read it out for me.")
> Entering new AgentExecutor chain...
Action:
```
{
  "action": "Azure Cognitive Services Text2Speech",
  "action_input": "Why did the chicken cross the playground? To get to the other slide!"
}
```
Observation: /tmp/tmpa3uu_j6b.wav
Thought: I have the audio file of the joke
Action:
```
{
  "action": "Final Answer",
  "action_input": "/tmp/tmpa3uu_j6b.wav"
}
```
> Finished chain.
'/tmp/tmpa3uu_j6b.wav'
from IPython import display
audio = display.Audio(audio_file)
display.display(audio)
previous
Toolkits
next
CSV Agent
 Contents
  
Create the Toolkit
Use within an Agent
By Harrison Chase
    
      © Copyright 2023, Harrison Chase.
      
  Last updated on Jun 16, 2023.
rtdocs_stable/api.python.langchain.com/en/stable/modules/agents/toolkits/examples/azure_cognitive_services.html