mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-09 11:51:37 -10:00
9 lines
226 B
Python
9 lines
226 B
Python
# Text-to-Speech with OpenAI
|
|
# Requires: export OPENAI_API_KEY=your-key
|
|
|
|
from praisonaiagents import AudioAgent
|
|
|
|
agent = AudioAgent(llm="openai/tts-1")
|
|
agent.say("Hello world!", output="hello.mp3")
|
|
print("Saved to hello.mp3")
|