Build Telephonic-Grade Voice AI β WebRTC-Ready Framework
Piopiy AI is an all-in-one platform for creating telephony-ready voice agents. Purchase numbers, configure agents, and let Piopiy handle call routing, audio streaming, and connectivity. The SDK plugs into your agent logic and supports many LLM, STT, and TTS providers so you can focus on conversation design.
Requires Python 3.10+.
pip install piopiy-aiTo install extras for the providers you plan to use:
pip install "piopiy-ai[cartesia,deepgram,openai]"Set provider API keys in the environment (for example, OPENAI_API_KEY).
import asyncio
import os
from piopiy.agent import Agent
from piopiy.voice_agent import VoiceAgent
from piopiy.services.deepgram.stt import DeepgramSTTService
from piopiy.services.openai.llm import OpenAILLMService
from piopiy.services.cartesia.tts import CartesiaTTSService
async def create_session():
voice_agent = VoiceAgent(
instructions="You are an advanced voice AI.",
greeting="Hello! How can I help you today?",
)
stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
llm = OpenAILLMService(api_key=os.getenv("OPENAI_API_KEY"))
tts = CartesiaTTSService(api_key=os.getenv("CARTESIA_API_KEY"))
await voice_agent.AgentAction(stt=stt, llm=llm, tts=tts)
await voice_agent.start()
async def main():
agent = Agent(
agent_id=os.getenv("AGENT_ID"),
agent_token=os.getenv("AGENT_TOKEN"),
create_session=create_session,
)
await agent.connect()
if __name__ == "__main__":
asyncio.run(main())| Provider | Categories |
|---|---|
| Anthropic | LLM |
| AssemblyAI | STT |
| AsyncAI | TTS |
| AWS | LLM, STT, TTS |
| Azure | LLM, STT, TTS |
| Cartesia | STT, TTS |
| Cerebras | LLM |
| Deepgram | STT, TTS |
| DeepSeek | LLM |
| ElevenLabs | TTS |
| Fal | STT |
| Fireworks | LLM |
| Fish | TTS |
| Gladia | STT |
| LLM, STT, TTS | |
| Grok | LLM |
| Groq | LLM, STT, TTS |
| Inworld | TTS |
| LMNT | TTS |
| Mistral | LLM |
| Minimax | TTS |
| Neuphonic | TTS |
| NIM | LLM |
| Ollama | LLM |
| OpenAI | LLM, STT, TTS |
| OpenPipe | LLM |
| OpenRouter | LLM |
| Perplexity | LLM |
| Piper | TTS |
| PlayHT | TTS |
| Qwen | LLM |
| Rime | TTS |
| Riva | STT, TTS |
| SambaNova | LLM, STT |
| Sarvam | TTS |
| Soniox | STT |
| Speechmatics | STT |
| TeleCMI | Transport |
| Together | LLM |
| Ultravox | STT |
| Whisper | STT |
| XTTS | TTS |
Enable interruption handling with Silero voice activity detection:
pip install "piopiy-ai[silero]"Silero VAD detects speech during playback, allowing callers to interrupt the agent.
Connect phone calls in minutes using the Piopiy dashboard:
- Sign in at dashboard.piopiy.com and purchase a phone number.
- Create a voice AI agent to receive
AGENT_IDandAGENT_TOKEN. - Use those credentials with the SDK for instant connectivity.
No SIP setup or third-party telephony vendors are requiredβPiopiy handles the calls so you can focus on your agent logic.
Thanks to Pepicat for making client SDK implementation easy.