Skip to main content

Voice-based chatbot using Ollama LLM with TDD

Project description

🎙️ Ollama Voice Q&A Bot

🎯 A voice-activated chatbot that answers only data science-related questions using Ollama (Mistral LLM).

Powered by Streamlit, Speech Recognition, and Test-Driven Development (TDD).


✨ Features

✅ Ask your question with your voice
✅ Responses only for data science-related queries
✅ Built-in Text-to-Speech replies
✅ Detects non-English and politely declines
✅ Locally hosted LLM via Ollama + Mistral
✅ Unit tested with TDD practices


🛠️ Tech Stack

Category Tools / Libraries Used
UI Streamlit
Speech-to-Text speech_recognition
Text-to-Speech pyttsx3
LLM Ollama with mistral model
Language Detection langdetect
Testing Pytest + Mocking

🧪 Test-Driven Development (TDD)

This project follows TDD principles:

  • Write failing tests first
  • Build functionality to pass them
  • Refactor and improve

📁 Tests included:

  • test_llm.py: Ensures LLM answers are relevant
  • test_voice.py: Mocks voice input and checks result
  • test_language.py: Validates correct language detection

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tdd_chatbot-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tdd_chatbot-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file tdd_chatbot-0.1.0.tar.gz.

File metadata

  • Download URL: tdd_chatbot-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for tdd_chatbot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 56a746cde7879e27bcab61d56ca23d9d1e9ab1a89f8acdfae6ba95daf4f2a9d5
MD5 3f1df808f9b5195400bc06e4da00c774
BLAKE2b-256 85181b82da3a95dbb7ef89a897209c72df1eb3a90b217ec2b3ee36d004360cb7

See more details on using hashes here.

File details

Details for the file tdd_chatbot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tdd_chatbot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for tdd_chatbot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a7e453d20ac79359044792225fb5dcc08db8a48ff25eda78b4f7ca8400047c5
MD5 a4b13ea8227058e3c8e6cba75832a554
BLAKE2b-256 b065d85d6ae0026b01823c8a28a27b163ee11ed16b7ebd318cf28a2746bcd270

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page