graph TD A[MediaAgent Start] --> B[Input: YouTube URL] B --> C[Validate URL] C --> D[Download Video as MP3] D --> E[Check MP3 Quality] E --> F[Convert MP3 to WAV] F --> G[Verify WAV Format] G --> H[Check: 44.1kHz, 16-bit] H --> I[Output: raw-wav-audio] subgraph Error Handling C -- Invalid URL --> J[Return Error] E -- Low Quality --> K[Return Error] G -- Invalid Format --> L[Return Error] end subgraph Quality Checks M[Check File Size] N[Check Duration] O[Check Sample Rate] end E --> M E --> N E --> O