mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-07 12:47:55 -10:00
12 lines
257 B
Python
12 lines
257 B
Python
# praisonai: skip=true
|
|
from praisonaiagents import AudioAgent
|
|
|
|
# Text to Speech
|
|
tts = AudioAgent(llm="openai/tts-1")
|
|
tts.say("Hello!", output="hello.mp3")
|
|
|
|
# Speech to Text
|
|
stt = AudioAgent(llm="openai/whisper-1")
|
|
text = stt.listen("hello.mp3")
|
|
print(text)
|