# matrx_ai.processing — Module Overview


## IMPORTANT: Do not edit auto-generated sections.

> This document is partially auto-generated. Sections tagged `<!-- AUTO:id -->` are refreshed by the generator.
> Everything else is yours to edit freely and will never be overwritten.

<!-- AUTO:meta -->
## About This Document

This file is **partially auto-generated**. Sections wrapped in `<!-- AUTO:id -->` tags
are overwritten each time the generator runs. Everything else is yours to edit freely.

| Field | Value |
|-------|-------|
| Module | `matrx_ai/processing` |
| Last generated | 2026-04-07 11:38 |
| Output file | `matrx_ai/processing/MODULE_README.md` |
| Signature mode | `signatures` |


**Child READMEs detected** (signatures collapsed — see links for detail):

| README | |
|--------|---|
| [`matrx_ai/processing/audio/MODULE_README.md`](matrx_ai/processing/audio/MODULE_README.md) | last generated 2026-04-07 11:38 |
| [`matrx_ai/processing/blocks/MODULE_README.md`](matrx_ai/processing/blocks/MODULE_README.md) | last generated 2026-04-07 11:38 |
**To refresh auto-sections:**
```bash
python utils/code_context/generate_module_readme.py matrx_ai/processing --mode signatures
```

**To add permanent notes:** Write anywhere outside the `<!-- AUTO:... -->` blocks.
<!-- /AUTO:meta -->

<!-- HUMAN-EDITABLE: This section is yours. Agents & Humans can edit this section freely — it will not be overwritten. -->

## Architecture

> **Fill this in.** Describe the execution flow and layer map for this module.
> See `utils/code_context/MODULE_README_SPEC.md` for the recommended format.
>
> Suggested structure:
>
> ### Layers
> | File | Role |
> |------|------|
> | `entry.py` | Public entry point — receives requests, returns results |
> | `engine.py` | Core dispatch logic |
> | `models.py` | Shared data types |
>
> ### Call Flow (happy path)
> ```
> entry_function() → engine.dispatch() → implementation()
> ```


<!-- AUTO:tree -->
## Directory Tree

> Auto-generated. 72 files across 8 directories.

```
matrx_ai/processing/
├── MODULE_README.md
├── __init__.py
├── audio/
│   ├── MODULE_README.md
│   ├── __init__.py
│   ├── audio_preprocessing.py
│   ├── audio_support.py
│   ├── groq_transcription.py
│   ├── transcription_cache.py
├── blocks/
│   ├── MODULE_README.md
│   ├── __init__.py
│   ├── block_detector.py
│   ├── block_registry.py
│   ├── generate_ts_types.py
│   ├── models/
│   │   ├── __init__.py
│   │   ├── artifact.py
│   │   ├── base.py
│   │   ├── comparison.py
│   │   ├── decision.py
│   │   ├── decision_tree.py
│   │   ├── diagram.py
│   │   ├── flashcards.py
│   │   ├── math_problem.py
│   │   ├── media.py
│   │   ├── presentation.py
│   │   ├── progress.py
│   │   ├── questionnaire.py
│   │   ├── quiz.py
│   │   ├── recipe.py
│   │   ├── research.py
│   │   ├── resources.py
│   │   ├── table.py
│   │   ├── tasks.py
│   │   ├── text.py
│   │   ├── thinking.py
│   │   ├── timeline.py
│   │   ├── transcript.py
│   │   ├── troubleshooting.py
│   ├── parsers/
│   │   ├── __init__.py
│   │   ├── artifact_parser.py
│   │   ├── comparison_parser.py
│   │   ├── decision_parser.py
│   │   ├── decision_tree_parser.py
│   │   ├── diagram_parser.py
│   │   ├── diff_parser.py
│   │   ├── flashcard_parser.py
│   │   ├── math_problem_parser.py
│   │   ├── presentation_parser.py
│   │   ├── progress_parser.py
│   │   ├── questionnaire_parser.py
│   │   ├── quiz_parser.py
│   │   ├── recipe_parser.py
│   │   ├── research_parser.py
│   │   ├── resources_parser.py
│   │   ├── table_parser.py
│   │   ├── task_parser.py
│   │   ├── timeline_parser.py
│   │   ├── timeline_stream_parser.py
│   │   ├── transcript_parser.py
│   │   ├── troubleshooting_parser.py
│   ├── stream_processor.py
│   ├── tag_detection_buffer.py
│   ├── tests/
│   │   ├── __init__.py
│   │   ├── block_tester.py
│   │   ├── stream_debug.py
│   │   ├── test_block_detector.py
│   │   ├── test_parsers/
│   │   │   ├── __init__.py
│   │   │   ├── test_flashcard_parser.py
│   │   │   ├── test_various_parsers.py
│   │   ├── test_results/
│   │   ├── test_stream_processor.py
│   │   ├── ts_bridge/
│   │   │   ├── parse_blocks.ts
# excluded: 10 .md, 1 .txt, 1 .json
```
<!-- /AUTO:tree -->

<!-- AUTO:signatures -->
## API Signatures

> Auto-generated via `output_mode="{mode}"`. ~5-10% token cost vs full source.
> For full source, open the individual files directly.
> Submodules with their own `MODULE_README.md` are collapsed to a single stub line.

```
---
Filepath: matrx_ai/processing/__init__.py  [python]




---
Submodule: matrx_ai/processing/blocks/  [54 files — full detail in matrx_ai/processing/blocks/MODULE_README.md]

---
Submodule: matrx_ai/processing/audio/  [5 files — full detail in matrx_ai/processing/audio/MODULE_README.md]

```
<!-- /AUTO:signatures -->

<!-- AUTO:callers -->
## Upstream Callers

> Auto-discovered by scanning all project files that import from this module.
> Set `ENTRY_POINTS` in `generate_readme.py` to pin specific functions.

| Caller | Calls |
|--------|-------|
| `matrx_ai/config/media_config.py` | `execute_stt(STTRequest(...))` |
| `matrx_ai/graph_nodes/transcribe_action.py` | `execute_stt(STTRequest(...))` |
| `matrx_ai/config/media_config.py` | `get_cache()` |
| `matrx_ai/providers/unified_client.py` | `preprocess_audio_in_messages()` |
| `matrx_ai/providers/unified_client.py` | `should_preprocess_audio()` |
<!-- /AUTO:callers -->

<!-- AUTO:dependencies -->
## Dependencies

**External packages:** groq, matrx_utils, pydantic, pytest
**Internal modules:** matrx_ai.config, matrx_ai.media
<!-- /AUTO:dependencies -->

<!-- AUTO:config -->
## Generation Config

> Auto-managed. Contains the exact parameters used to generate this README.
> Used by parent modules to auto-refresh this file when it is stale.
> Do not edit manually — changes will be overwritten on the next run.

```json
{
  "subdirectory": "matrx_ai/processing",
  "mode": "signatures",
  "scope": null,
  "project_noise": null,
  "include_call_graph": false,
  "entry_points": null,
  "call_graph_exclude": [
    "tests"
  ],
  "signatures_exclude": [
    "tests",
    "db",
    "local_data",
    "docs"
  ]
}
```
<!-- /AUTO:config -->
