Inspiration
I was inspired by the dual challenge of plastic waste management and the digital divide in rural communities. We realized that while many tech solutions exist, they often rely on smartphones and constant internet access, which aren't always available. This led me to ask: what if I could use a simple voice interface—something almost everyone has access to—to tackle this problem? The idea of making advanced AI and environmental education accessible to anyone, anywhere, became our mission.
What it does
Plastic Pehchan is a voice-based web app designed to empower individuals in rural communities to manage their plastic waste properly. A user simply speaks into the web app, describing the plastic item they have. Our AI bot, powered by Ollama, instantly identifies the item, provides proper disposal instructions, and gives them the location of a nearby recycler. Most importantly, it rewards them with "Eco-Points," creating an incentive for sustainable behavior and helping to build a community-led circularity. Now, mainly concentrating on the region of Banglore.
How we built it
We built Plastic Pehchan as a full-stack web application.
- Frontend: The user interface is a simple HTML/CSS/JavaScript web page. We used the
MediaRecorderAPI to access the microphone and record the user's voice directly in the browser. The JavaScript then sends this audio data to our backend using thefetchAPI. - Backend: The backend is a Python Flask server. When the audio is received, the server sends it to a free Speech-to-Text (STT) API for transcription.
- AI Engine: The transcribed text is then sent to our local Ollama server , gemma:2bmodel. We used a system prompt to give our bot a specific persona and knowledge base, allowing it to correctly identify the plastic and provide the necessary instructions. We also built a simple local JSON file to store information about recyclers and points.
- Voice Response: Finally, we used a Text-to-Speech (TTS) API to convert the bot's response back into an audio file, which the backend sends to the frontend to be played for the user.
Challenges we ran into
One of the biggest challenges was integrating all the different components. Getting the frontend, backend, and the local Ollama server to communicate seamlessly was a complex task. For instance, correctly formatting the audio data sent from the browser for the STT API and ensuring the Flask server could communicate with the Ollama server running on a local machine required significant debugging.
Another challenge was resource management. Running an LLM like llama3 locally with Ollama required a machine with at least 8 GB of RAM. This constraint made it clear that while my project is a great proof of concept, deployment to a wider audience would need to address hardware requirements.
Accomplishments that we're proud of
I am proud of successfully creating a functional prototype that operates entirely on a local AI model, making it a truly free-to-use solution. I successfully integrated three distinct APIs (STT, TTS, and Ollama) to create a fluid, conversational experience. I am also proud that our solution is low-tech at the user's end but leverages powerful, modern technology, effectively bridging the technology gap.
What I learned
I gained significant experience in full-stack development, specifically in the context of AI and hardware constraints. We learned the value of a local-first approach to AI projects, which prioritizes privacy and cost-effectiveness. We also learned how to craft effective AI prompts and manage the entire lifecycle of an AI application, from a user's voice input to a generated audio response.
What's next for Plastic Pehchan
For the future, I planned to expand the knowledge base to include more types of plastics and a wider list of local recyclers, also to include local languages and to expand the recylers information for wider region .I also want to explore the use of smaller, more efficient LLMs that can run on lower-spec hardware. I aim to turn the prototype into a fully functional community tool that can be used via a simple phone call, removing the need for even a web app interface.
Log in or sign up for Devpost to join the conversation.