Skip to content

miladnasiri/Speech-to-text-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speech-to-Text Analysis Dashboard

Overview

Real-time speech recognition and sentiment analysis web application built with Flask and Google's Speech Recognition API. Features an intuitive dashboard displaying transcription history, sentiment scores, and downloadable transcripts. Interface

Architecture & Methodology

  • Speech Recognition: Google Speech-to-Text API via SpeechRecognition library
  • Sentiment Analysis: NLTK VADER (Valence Aware Dictionary for Sentiment Reasoning)
  • Backend: Flask RESTful API with modular design
  • Frontend: Responsive UI with TailwindCSS and vanilla JavaScript
  • Data Storage: File-based transcript storage with timestamp organization
  • Analysis Pipeline:
  1. Audio Capture -> Speech Recognition
  2. Text Processing -> Sentiment Analysis
  3. Data Storage -> File System
  4. Real-time Updates -> WebUI

Features

  • Real-time speech-to-text conversion
  • Sentiment analysis (Positive/Negative/Neutral scores)
  • Transcript history with timestamps
  • Downloadable transcripts
  • Responsive dashboard UI
  • Audio feedback and visual indicators

Technology Stack

  • Python 3.8+
  • Flask 3.1.0
  • NLTK 3.8.1
  • SpeechRecognition 3.11.0
  • PyAudio 0.2.14
  • TailwindCSS
  • Google Speech API

Installation

git clone https://github.com/miladnasiri/Speech-to-text-.git
cd Speech-to-text-
python -m venv venv
source venv/bin/activate  # Linux/Mac
pip install -r requirements.txt
python src/app.py

Project Structure

CopySpeech-to-Text/
├── src/
│   ├── app.py          # Flask application
│   ├── templates/      # HTML templates
│   └── static/         # CSS, JS assets
├── data/
│   └── transcripts/    # Stored transcripts
└── requirements.txt    # Dependencies

API Endpoints

GET / : Dashboard interface POST /recognize : Speech recognition endpoint GET /transcripts/ : Download endpoint

Dependencies

CopyFlask==3.1.0
SpeechRecognition==3.11.0
pyaudio==0.2.14
nltk==3.8.1
pillow==11.0.0
pytest==8.3.3

Features in Detail

1.Speech Recognition

  • Real-time audio capture
  • Google Speech API integration
  • Error handling for unclear speech

Sentiment Analysis

  • VADER sentiment scoring
  • Compound score calculation
  • Positive/Negative/Neutral breakdown

Data Management

  • Timestamp-based filing
  • Downloadable transcripts
  • Historical record keeping

User Interface

  • Real-time feedback
  • Visual sentiment indicators
  • Responsive design
  • Download functionality

MIT License Authors Milad Nasiri

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published