Inspiration

Our team was inspired by the "Best Use Technology to Create a Positive Social Impact" track and the mission of the IMC Charitable Foundation to help individuals fulfil their potential. With team members who have family members that have suffered from addiction, we recognised that addiction recovery is an incredibly isolating journey. While therapy is vital, it isn't available at 3 AM when a craving hits, or during a high-pressure social event.

We wanted to bridge the gap between clinical therapy and daily life. We asked ourselves: What if you could talk to your "future self" or a supportive loved one instantly, 24/7? This led to the creation of Kalm, a tool designed to use the power of voice, specifically the emotional resonance of familiar voices, to provide immediate, empathetic support.

What it does

Kalm is an on-demand addiction recovery service in which users access the service and select what type of addiction they are struggling with. They then are connected to a telegram chatbot that delivers them a personalised message to help them through this time. We also have features like voice cloning to allow a user's voice to be used in future, to deliver them a personal supportive message from themselves.

Here are some more of our features in more detail:

Deep Linking Onboarding: Users select their specific struggle (Alcohol, Drugs, Gambling, etc.) on the website, which deep-links to the Telegram bot to start a conversation contextually aware of their specific addiction.

Live Conversation Mode: A web-based "Talk" feature that allows for low-latency, real-time voice conversations with the AI therapist.

"Future Self" & Loved One Cloning: A standout feature where users can upload a 15-30 second audio sample of themselves or a loved one. The bot then uses this cloned voice to deliver affirmations and support, scientifically increasing the emotional impact of the message.

How we built it

We built Kalm with a Next.js 14 + React frontend and a FastAPI backend. The web app lets users choose a recovery focus and either deep-link into the Telegram bot or start a live voice session in the browser; Tailwind CSS handles styling. The backend powers the Telegram bot, runs crisis detection and supportive messaging with OpenAI, and generates audio using ElevenLabs (text-to-speech, voice cloning, and Conversational AI for live calls). For the live voice chat, the backend requests a signed ElevenLabs Conversational AI URL, while the frontend uses the ElevenLabs React hook to start/end sessions and capture mic input. Bot state is lightweight, voice clone IDs are stored in a local JSON file, and configuration is managed via environment variables.

Challenges we ran into

Using Asynchronous Functions: When certain functions are called before the main program can run, we found that certain errors can arise with unassigned variable values. We got to have some insightful conversations into the flow of the program and how certain situations can lead to certain problems.

Safety vs. Empathy: Tuning the AI prompts was difficult. We needed the AI to be warm and supportive (Persona: "friend") but strictly non-medical. Implementing the detect_crisis function was a critical challenge to ensure we didn't just "chat" through a life-threatening situation.

Accomplishments that we're proud of

The "Future Self" Feature: Successfully implementing the pipeline that takes a user's Telegram voice note, clones it via ElevenLabs, and allows them to immediately trigger supportive messages in their own voice using the /personal command.

Seamless Crisis Intervention: We are proud of the safety layer that instantly detects keywords related to self-harm and overrides the AI persona to provide real-world help resources.

Real-Time Voice Chat: Getting the browser-based, full-duplex voice conversation working with the ElevenLabs React SDK to provide a "phone call" experience.

What we learned

The Power of Audio: We learned that receiving a voice note provides a significantly higher level of perceived empathy compared to a text bubble.

API Orchestration: We gained deep experience in chaining multiple AI services (OpenAI -> ElevenLabs -> Telegram) and managing the asynchronous nature of media processing.

Prompt Engineering for Therapy: We learned how to craft system prompts that balance being "supportive" without being "repetitive" or "condescending."

What's next for Kalm - Addiction Recovery

Outbound Calls: We want to implement the ability for the bot to actually call the user via phone during high-stress times (synced with their calendar, e.g., during a Friday night social event).

Journaling & Analytics: Implementing the planned daily tracker to visualize recovery progress over time.

Expanding To Other Socials: In the name! Expand to integrate into emails, Whatsapp and etc.

Built With

  • asyncio
  • autoprefixer
  • elevenlabs
  • elevenlabsapi
  • fastapi
  • httpx
  • javascript
  • next.js
  • openaiapi
  • postcss
  • pydantic
  • python
  • react
  • tailwindcss
  • telegrambotapi
  • uvicorn
  • vercel
Share this project:

Updates