# Project Structure

### /data

* **/raw** - Original, immutable data dump.
* **/processed** - Final, canonical data sets for modeling.
* **/external** - Data from third-party sources.
* **/interim** - Intermediate transformed data.
* **/profanity\_data** - Data for profanity detection model.
* **/test** - Data for unit tests.

### /db

* **db\_init.sql** - Script for initializing the database.
* **db\_stream\_init.sql** - Script for initializing streaming database.

### **/RabbitMQ**

* **advanced\_config** - Configuration file for RabbitMQ service.
* **rabbitmq.dockerfile** - Dockerfile for RabbitMQ container.

### **/gpu\_utils**

* **daemon.json** - Configuration file to force GPU usage (not used for CPU-only devices).

### **/mysql**

* **Deprecated MySQL database**

### **/tqai**

* **tqai.dockerfile** - Dockerfile for app container.
* **setup\_docker.sh** - Bash script for installing Docker & MySQL dependencies.

### /docs

* Directory for storing documentation configuration.
  * **/\_templates**
    * **layout.html** - Custom template for docs.
  * **conf.py** - Documentation configuration file.

### /models

**Audio Quality Classification (binary saved models):**

* **/audio\_lag\_detector** - Lagging audio classification.
* **/audio\_reverb\_detector** - Reverb audio classification.
* **/music\_detector** - Music vs. speech classification.

**Speech Emotion Classification (binary saved models):**

* **/speech\_neg\_emotion** - Negative emotions.
* **/speech\_neutral** - Neutral vs. non-neutral (sadness, anger, fear, disgust).
* **/speech\_pos\_emotion** - Positive emotions (calm, happiness, surprised).
* **/speech\_posneg\_emotion** - Positive vs. negative.

### /ntlk\_data

* Locally saved data for NLTK model.

### /notebooks

* Directory for storing research notebooks.

### /reports

* Directory for storing meeting reports.

### /src

* **config.py** - Script for loading settings from `config.yaml`.

### **/app**

* **Flask app structure**:
  * **/static** - Static files for app.
  * **/templates** - Templates for app.
  * **app.py** - Flask app (API, report generation, etc.).
  * **default\_settings.pkl** - Default settings for endpoint `/meeting/<meeting_id>/` (custom report generation).

### **/data**

* **Data Processing Scripts**:
  * **audio\_splitter.py** - Splits audio files into shorter fragments.
  * **audiodataframe.py** - Class for processing audio files.
  * **basedataframe.py** - Abstract base class for audio and text dataframes.
  * **textdataframe.py** - Class for processing text data.

### **/database**

* **DB Models & Scripts**:
  * **create\_database.py** - Script for creating database.
  * **/models/init.py** - DB models and methods.

### **/features**

* **fourier\_t.py** - Generates Fourier transform of audio file.
* **rolling\_emotions.py** - Calculates time-weighted moving average scores for emotions.

### /models

**Audio-Based Models:**

* **basemodel.py** - Base class for some audio models.
* **audio\_lag\_detector.py** - Detects audio lag.
* **audio\_reverb\_detector.py** - Detects audio reverb.
* **speech\_emotion\_recognition\_model.py** - Classifies emotions in audio (hybrid architecture).
* **music\_detector.py** - Detects music vs. speech.
* **diarizationmodel.py** - Speaker diarization.
* **speaker\_detection\_model.py** - Compares speaker recordings.

**Text-Based Models:**

* **speech\_to\_text.py** - Speech-to-text processing.
* **key\_point\_finder.py** - Finds key parts of speech.
* **rpunct.py** - Local source code for rpunct.
* **text\_emotion\_recognition\_model.py** - Classifies emotions from text (hybrid architecture).
* **text\_summarizer.py** - Generates text summary.
* **toxicity\_detection\_model.py** - Detects toxicity in text fragments.
* **profanitydetectionmodel.py** - Detects profanity in text fragments.
* **name\_recognition\_model.py** - Detects introductions (e.g., "Hello I’m George").
* **offensive\_lang\_detection\_model.py** - Detects offensive language in text.
* **restore\_punctuation\_model.py** - Corrects punctuation in speech-to-text output.

**Environmental Recommendations:**

* **/sensorsmodels.py** - Environmental recommendations.

### /services

**Streaming & Report Services:**

* **audio\_report\_service.py** - Service for audio meeting report generation.
* **services\_bridge.py** - Connects streaming service and audio report service.
* **meetings\_api.py** - Class for API endpoints.

### **/streaming\_service**

* **Service for streaming audio** from Timeqube Hardware Prototype to server.

### /tests

* **Unit tests directory**.

### /tools

* **GUI tool for labeling audio files**.

### /utils

* **Auxiliary Scripts**:
  * **audio/** - Audio processing utilities (e.g., `audio.py`, `audio_data.py`).
  * **check\_upsampling.py** - Checks audio upsampling from low frequency.
  * **format\_converter.py** - Converts various audio/video formats.
  * **docsutils/** - Utilities for documentation (e.g., `dictutils.py`).
  * **logging\_utils.py** - Error logger for services.
  * **nlp\_utils.py** - Extracts topics from text.
  * **reportutils.py** - Sends report/message via email.
  * **rttm\_utils.py** - Merges short RTTM files.
  * **speaker\_statistics\_model.py** - Calculates speaker statistics.
  * **textutils.py** - Processes text (e.g., splits text into statements).

### /visualization

* **Report generation and plot creation**
  * **/images** - JPG files to include in reports.
  * **/templates** - HTML templates for rendering reports.
  * **audio\_feature\_plot.py** - Plots audio features (e.g., from `AudioDataframe`) for better understanding.
  * **generate\_business\_report.py** - Generates HTML report for meetings.
  * **meeting\_visualizer.py** - Class for generating various plots based on meeting data.

### Other Files in Root

**Database Management**

* **add\_user\_to\_db.py** - Script for adding a new user to the database.
* **service\_cleanup.py** - Cleans the database and service files (e.g., reports, WAV fragment files) and creates default accounts.

**Docker & Project Setup**

* **docker-compose.yml** - Docker Compose settings.
* **requirements.txt** - External requirements for the project.
* **config.yaml** - Project configuration parameters.

**Pre-commit Hooks**

* **install\_precommit\_hooks.bash** - Script for installing pre-commit hooks requirements.
* **precommitutils.py** - Configuration for hooks.
* **pyproject.toml** - Configuration for the `interrogate` package.

**Documentation**

* **interrogate\_badge.svg** - Infographic of docstring coverage percentage.
* **show\_docs.py** - Creates and displays project documentation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meetra.ai/tech-stack-and-models/project-structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
