Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

VoiceSlide

๐ŸŽ™๏ธ NLP-powered presentations with voice navigation, live highlighting, and speech analytics.

Build Status Python 3.10+ Flask 3.x License faster-whisper Socket.IO reveal.js

image

image

---

๐Ÿ“– Table of Contents


๐Ÿ”ญ Overview

VoiceSlide is a full-stack presentation platform that lets you control slides with your voice. It uses on-device speech-to-text (faster-whisper), semantic intent classification, and voice activity detection (Silero VAD) to deliver a hands-free presenting experience โ€” no cloud APIs, no microphone button mashing, no latency.

Why? Traditional presentation tools force speakers to click, tap, or use a clicker. VoiceSlide replaces all of that: just speak naturally, and the system navigates to the right slide, highlights keywords in real time, answers your Q&A from speaker notes, and tracks your speaking analytics โ€” all locally and in real time.

How? A Flask + Socket.IO backend streams browser microphone audio through a VAD โ†’ Whisper โ†’ NLP pipeline. The frontend renders slides with reveal.js and reacts to WebSocket events for navigation, highlighting, and analytics.


โœจ Key Features

Feature Description
๐Ÿ—ฃ๏ธ Voice Navigation Say "next slide", "go to slide 5", or even describe content โ€” the system finds and navigates to the right slide using semantic search.
๐ŸŽฏ Live Keyword Highlighting As you speak, matching words on the current slide are highlighted in real time using fuzzy matching.
๐Ÿง  Semantic Content Search Uses sentence-transformer embeddings to match spoken phrases to slide content, even when wording differs.
๐ŸŽค Voice Activity Detection Silero VAD detects speech boundaries โ€” transcription only fires when you actually pause, eliminating false triggers.
๐Ÿ“Š Speech Analytics Dashboard Post-presentation dashboard with filler word tracking, words-per-minute, and VADER sentiment analysis over time.
๐Ÿ’ฌ Q&A from Speaker Notes Ask a question during your talk and the system searches your speaker notes for relevant answers, displayed on the Presenter Panel.
๐Ÿ“‘ PPTX Import Upload a .pptx file and it's automatically converted to VoiceSlide's slide format โ€” no manual JSON editing required.
๐Ÿ–ฅ๏ธ Presenter Panel A private second-screen view with speaker notes, Q&A results, and current slide context.
๐ŸŒ Fully Local All NLP runs on-device. No cloud APIs, no data leaves your machine.

๐Ÿ“‹ Prerequisites

Requirement Version Notes
Python 3.10+ Required for type hints and library compatibility
PyTorch 2.x With CUDA 12.1 for GPU acceleration (CPU works but is slower)
torchaudio 2.x Required by Silero VAD
Node.js โ€” Not required โ€” frontend uses CDN-loaded libraries
FFmpeg โ€” Not required โ€” faster-whisper handles raw PCM directly

Note

PyTorch and torchaudio must be installed manually for your CUDA version before running pip install. See Installation below.


๐Ÿš€ Installation

1. Clone the Repository

git clone [INSERT_REPO_URL].git
cd voiceslide

2. Create a Virtual Environment

python -m venv venv
source venv/bin/activate        # Linux / macOS
venv\Scripts\activate           # Windows

3. Install PyTorch (GPU)

Install PyTorch and torchaudio for your CUDA version. Example for CUDA 12.1:

pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu121

Tip

For CPU-only: pip install torch torchaudio --index-url https://download.pytorch.org/whl/cpu

4. Install Python Dependencies

pip install -r backend/requirements.txt

5. Add Slide Content

Either upload a .pptx through the web UI or place a slides.json file in the data/ directory:

mkdir -p data
# Option A: Start the server and use /upload in the browser
# Option B: Create data/slides.json manually (see Usage below)

6. Start the Server

python backend/app.py

The server starts on http://localhost:5000 by default.


๐ŸŽฎ Usage

Presenting with Voice Control

  1. Open http://localhost:5000 in your browser.
  2. Click the microphone button (bottom-right) to enable voice input.
  3. Speak naturally โ€” VoiceSlide handles the rest:
"Next slide"           โ†’ advances one slide
"Previous slide"       โ†’ goes back one slide
"Go to slide 3"       โ†’ jumps to slide 3
"Show the revenue chart" โ†’ semantic search finds the matching slide
"First slide"          โ†’ jumps to the beginning
"Last slide"           โ†’ jumps to the end

Presenter Panel

Open http://localhost:5000/presenter in a second browser window (or second monitor) to see:

  • Current slide speaker notes
  • Real-time Q&A results from your notes
  • Transcript feed

Speech Analytics

After your presentation, open http://localhost:5000/analytics to review:

  • Average WPM โ€” were you rushing or dragging?
  • Filler word breakdown โ€” how many "um"s, "like"s, "you know"s?
  • Sentiment timeline โ€” was your language confident and positive?

Slide Data Format

VoiceSlide uses a simple JSON format. You can create slides manually or import a .pptx:

{
  "slides": [
    {
      "title": "Welcome",
      "content": "<h1>Welcome to VoiceSlide</h1><p>Hands-free presentations.</p>",
      "notes": "Introduce the product and greet the audience."
    },
    {
      "title": "Revenue Growth",
      "content": "<h2>Revenue</h2><p>Revenue grew 18% year over year.</p>",
      "notes": "Key talking point: 18% growth driven by enterprise segment."
    }
  ]
}

โš™๏ธ Configuration

All configuration is managed through environment variables. Defaults are defined in backend/config.py.

Variable Default Description
VOICESLIDE_HOST 0.0.0.0 Server bind address
VOICESLIDE_PORT 5000 Server port
VOICESLIDE_DEBUG true Enable Flask debug mode
# Example: Run on port 8080 with debug off
export VOICESLIDE_HOST="127.0.0.1"
export VOICESLIDE_PORT="8080"
export VOICESLIDE_DEBUG="false"
python backend/app.py

๐Ÿ“ Project Structure

voiceslide/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app.py                 # Flask + Socket.IO entry point
โ”‚   โ”œโ”€โ”€ config.py              # Environment-based configuration
โ”‚   โ”œโ”€โ”€ transcriber.py         # faster-whisper STT engine
โ”‚   โ”œโ”€โ”€ vad_engine.py          # Silero VAD speech detection
โ”‚   โ”œโ”€โ”€ intent_classifier.py   # Voice command classification
โ”‚   โ”œโ”€โ”€ context_search.py      # Semantic slide search (sentence-transformers)
โ”‚   โ”œโ”€โ”€ keyword_highlighter.py # Fuzzy keyword matching for live highlights
โ”‚   โ”œโ”€โ”€ qa_assistant.py        # Q&A from speaker notes
โ”‚   โ”œโ”€โ”€ analytics.py           # Speech analytics (fillers, WPM, sentiment)
โ”‚   โ”œโ”€โ”€ slide_loader.py        # JSON slide loading & validation
โ”‚   โ”œโ”€โ”€ pptx_converter.py      # .pptx โ†’ slides.json converter
โ”‚   โ””โ”€โ”€ requirements.txt       # Python dependencies
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ index.html             # Main presentation view
โ”‚   โ”œโ”€โ”€ upload.html            # Slide upload / editor page
โ”‚   โ”œโ”€โ”€ presenter.html         # Presenter Panel (speaker notes + Q&A)
โ”‚   โ”œโ”€โ”€ analytics.html         # Speech Analytics Dashboard
โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”‚   โ”œโ”€โ”€ style.css          # Global styles & design tokens
โ”‚   โ”‚   โ”œโ”€โ”€ presentation.css   # Slide presentation styles
โ”‚   โ”‚   โ”œโ”€โ”€ presenter.css      # Presenter Panel styles
โ”‚   โ”‚   โ”œโ”€โ”€ upload.css         # Upload page styles
โ”‚   โ”‚   โ””โ”€โ”€ analytics.css      # Analytics Dashboard styles
โ”‚   โ””โ”€โ”€ js/
โ”‚       โ”œโ”€โ”€ app.js             # Main presentation logic + WebSocket
โ”‚       โ”œโ”€โ”€ presenter.js       # Presenter Panel logic
โ”‚       โ”œโ”€โ”€ upload.js          # Upload page logic
โ”‚       โ”œโ”€โ”€ analytics.js       # Analytics Dashboard charts (Chart.js)
โ”‚       โ””โ”€โ”€ audio-processor.js # AudioWorklet for mic capture
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ test_analytics.py
โ”‚   โ”œโ”€โ”€ test_context_search.py
โ”‚   โ”œโ”€โ”€ test_intent_classifier.py
โ”‚   โ”œโ”€โ”€ test_interceptor.py
โ”‚   โ”œโ”€โ”€ test_keyword_highlighter.py
โ”‚   โ”œโ”€โ”€ test_qa_assistant.py
โ”‚   โ”œโ”€โ”€ test_transcriber.py
โ”‚   โ”œโ”€โ”€ test_universal_fallback.py
โ”‚   โ””โ”€โ”€ fixtures/
โ”‚       โ”œโ”€โ”€ sample.pptx
โ”‚       โ””โ”€โ”€ sample_audio.raw
โ””โ”€โ”€ data/
    โ””โ”€โ”€ slides.json            # Active slide content (auto-generated)

๐Ÿค Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style โ€” no comments unless they match existing patterns or explain complex logic.
  • All new backend features must include tests in tests/.
  • Run the full test suite before submitting:
pytest tests/ -v

Important

PyTorch and torchaudio are installed manually and are not listed in requirements.txt. Make sure your environment has them installed before running tests.


๐Ÿ“„ License

Distributed under the [INSERT_LICENSE] License. See LICENSE for more information.


๐Ÿ’ฌ Contact & Acknowledgements

[Muhammad Hassan] โ€” [muhammadhassan1762005@gmail.com] โ€” @MY_LinkedIn

Project Link: [INSERT_REPO_URL]

Built With


Made with โค๏ธ and a whole lot of voice commands.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages