Use AI to talk to your Data

🎀 Talk to Your Data: Building an AI-Powered Text-to-SQL Pipeline with Speech Recognition

Want to chat with your database? In this video, I demonstrate a fully functional demo application that lets you talk to your data using natural language and AI!

πŸ”§ What I Built:
A complete text-to-SQL pipeline that combines speech recognition with LLM technology to let users query company data conversationally. The system takes natural language questions, converts them to PostgreSQL queries using AI, and returns plain-English summaries with the actual data.

πŸ“‹ How It Works:

text
User speaks/natural language question β†’ Intent Classifier β†’ 
If data needed: Schema + question β†’ LLM generates SQL β†’ 
SQL validated & executed β†’ Results β†’ LLM summarizes β†’ 
Answer + SQL + data displayed

πŸš€ Tech Stack:

  • Frontend: React with speech-to-text integration

  • Middleware: Node.js + Express

  • AI: Ollama + LLM for SQL generation

  • Database: PostgreSQL

  • Container: Docker

πŸ’» Quick Start:

bash
git clone https://github.com/gitspiffy/talkingtodata.git
cd talkingtodata
docker-compose up -d --build

Access the app at http://localhost:8080

✨ Features Demonstrated:

  • 🎯 Natural language queries to your database

  • 🎀 Speech recognition for hands-free data interaction

  • πŸ€– LLM-powered SQL generation

  • πŸ“Š Real-time query execution and results

  • πŸ’¬ Bilingual support (Spanish/English demo included)

  • πŸ” Transparent SQL display showing the generated queries

πŸ“Š Sample Queries You’ll See:

  • “What was the total revenue in Q1 2026?”

  • “Which shipping carrier ships the most packages?”

  • “Show me new customers in 2025 vs 2024”

  • “List all orders from Summit Aerospace”

  • “Average order total from Q2 2025 to Q1 2026”

πŸ” Under the Hood:
I walk through the entire codebase, explaining:

  • The prompt engineering for SQL generation

  • How the intent classifier routes queries

  • The speech-to-text implementation

  • Database initialization and schema management

  • The complete request/response flow from frontend to database and back

🎯 Perfect For:

  • Developers interested in LLM integrations

  • Teams looking to build natural language interfaces for their data

  • Anyone curious about practical AI applications

  • Data professionals wanting to experiment with text-to-SQL

πŸ“š Links: