Explore the codebase to understand the audio processing pipeline in prepare_shards.py. I need to understand:
1. How FLAC decoding is done
2. How LUFS computation is performed
3. How spectral computation works
4. How audio encoding (WAV) is done
5. The overall worker/processing architecture
6. Any existing parallelization

Focus on finding the actual implementation of these expensive operations and how data flows between them. Look for timing/profiling code too.


I'll explore the codebase to understand the audio processing pipeline in prepare_shards.py. Let me start by locating the relevant files and understanding the structure.


Bash

find /home/ubuntu/maya3_prepare -type f -name "*.py" | head -20

List Python files to understand project structure


/home/ubuntu/maya3_prepare/tts/tts/__init__.py
/home/ubuntu/maya3_prepare/tts/tts/core/optimization.py
/home/ubuntu/maya3_prepare/tts/tts/core/lora.py
/home/ubuntu/maya3_prepare/tts/tts/core/modeling.py
/home/ubuntu/maya3_prepare/tts/tts/core/tokenization.py
/home/ubuntu/maya3_prepare/tts/tts/core/constants.py
/home/ubuntu/maya3_prepare/tts/tts/core/prompting.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/discriminator.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/activations.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/filters.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/decoding.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/upsampler.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/encoder.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/encoder_modules.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/encoding.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/decoder.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/decoder_modules.py
/home/ubuntu/maya3_prepare/tts/tts/core/codec/criterion.py
/home/ubuntu/maya3_prepare/tts/tts/data/data_utils.py
/home/ubuntu/maya3_prepare/tts/tts/data/caching.py


Now let me read the prepare_shards.py file to understand the audio processing pipeline: