How rupeshkeesaram/applied-ml-speech-to-text works
Main Components
• Frontend (User Interface):
• The Streamlit app inside the "app" folder, with a dedicated pages subdirectory (e.g., 1_Audio_File.py and 2_Youtube_Video.py) to handle multiple UI pages.
• Backend Processing:
• Data management:
▪ Directory "data" contains raw audio, interim data, processed outputs, and user-uploaded files.
• Core source code under "src":
▪ "src/data_processing": Preprocessing of audio input.
▪ "src/feature_extraction": Module for extracting features from audio.
▪ "src/model": Functions for loading and fine-tuning the ASR model (also includes utilities for transcript creation and practice model loading).
▪ "src/evaluation": Scripts to assess the performance of the ASR model.
▪ "src/utils": Utility functions including extracting audio from YouTube and loading audio data.
• Configuration management:
▪ "configs", which likely holds environment configurations or parameter settings (even though the README refers to "config" as centralized settings).
• Model Management:
• The "models" folder hosts the base model archives and extracted model files.
• Experimentation and Documentation:
• "notebooks" directory for colloaborative work and model fine-tuning experiments.
• "docs" folder includes extensive documentation (Project Description, Resources, Comparison documents).
Key Processes and Data Flow
• User Interaction:
• The user accesses the Streamlit app through a web browser.
• The app sends audio files or YouTube links (from the app/pages scripts) to the backend processing routines.
• Data Processing Pipeline:
• Raw audio files are ingested from "data/raw" or "data/uploaded" and then processed through "src/data_processing" routines.
• Feature engineering is performed in "src/feature_extraction".
• Model Interaction:
• The processed audio features are passed into the ASR model (loaded and possibly fine-tuned using code in "src/model").
• Evaluation of model outputs is done via scripts located in "src/evaluation".
• Logging and Monitoring:
• Global logs in "logs/global_log.log" capture important runtime events.
• Docker Containerization:
• The Dockerfile and associated configuration (like .dockerignore) encapsulate the entire project, ensuring that the environment and dependencies (defined in packages.txt and requirements.txt) are consistent during deployment.
Architectural Patterns and Design Principles
• Layered Architecture:
• Clearly separate the presentation layer (Streamlit app), processing layers (data, feature extraction, model inference), and supporting modules (utils, configuration, logging).
• Modularity:
• The project is modularized by domain (e.g., data processing vs. model operations), which enhances maintainability and scalability.
• Containerization:
• Deployment via Docker emphasizes environment consistency and ease of deployment.