This guide demonstrates how to build a voice-based collection agent that can handle payment reminders, follow-ups, and payment assistance using LiveKit for real-time communication and Sarvam AI for speech processing. Perfect for fintech companies, banks, and lending institutions serving Indian customers.
A collection agent that can:
.env file with your API keyspython agent.py devpython agent.py consoleCreate a file named .env in your project folder and add your API keys:
Replace the values with your actual API keys.
Create collection_agent.py:
In a new terminal, run:
For customers who prefer Hindi:
Male (23): Shubh (default), Aditya, Rahul, Rohan, Amit, Dev, Ratan, Varun, Manan, Sumit, Kabir, Aayan, Ashutosh, Advait, Anand, Tarun, Sunny, Mani, Gokul, Vijay, Mohit, Rehan, Soham
Female (14): Ritu, Priya, Neha, Pooja, Simran, Kavya, Ishita, Shreya, Roopa, Tanya, Shruti, Suhani, Kavitha, Rupali
language="unknown" to automatically detect the language - great for diverse customer basesaditya or anand for collection callsAPI key errors: Check that all keys are in your .env file and the file is in the same directory as your script.
Module not found: Run the installation command again based on your operating system.
Poor transcription: Try language="unknown" for auto-detection, or specify the correct language code.
Happy Building!