trax/tests/fixtures/README.md

61 lines
2.0 KiB
Markdown

# Test Fixtures
This directory contains test fixtures for the Trax comprehensive testing suite.
## Audio Files Required
Place the following real audio files in the `audio/` directory for comprehensive testing:
### Required Test Audio Files
1. **sample_5s.wav** - 5-second clear speech audio (16kHz mono WAV)
- Used for quick transcription tests
- Should contain clear, simple speech
2. **sample_30s.mp3** - 30-second audio with varied content (MP3 format)
- Used for format conversion testing
- Should include some technical terms
3. **sample_2m.mp4** - 2-minute video file with audio (MP4 format)
- Used for video processing pipeline tests
- Should contain continuous speech
4. **sample_noisy.wav** - Audio with background noise
- Used for noise handling tests
- Should contain speech with background noise
5. **sample_multi.wav** - Multi-speaker audio
- Used for speaker diarization tests (v4)
- Should contain multiple distinct speakers
6. **sample_tech.mp3** - Technical content audio
- Used for technical vocabulary testing
- Should contain technical terms, acronyms, etc.
## Usage
These files are automatically detected by the test fixtures in `conftest.py` and used throughout the test suite.
**Important**: The comprehensive testing suite follows the project rule of using real audio files instead of mocks to catch real-world edge cases.
## Creating Test Files
If you need to create test audio files for development:
```bash
# Generate a 5-second test tone (requires ffmpeg)
ffmpeg -f lavfi -i "sine=frequency=440:duration=5" -ar 16000 -ac 1 sample_5s.wav
# Convert to different formats
ffmpeg -i sample_5s.wav -ar 44100 sample_30s.mp3
ffmpeg -i sample_5s.wav -c:v libx264 -c:a aac sample_2m.mp4
```
## Performance Requirements
Test files should enable verification of these v1 pipeline requirements:
- 5-minute audio processed in <30 seconds
- Memory usage <2GB
- 95% transcription accuracy on clear audio
- Real-time factor <0.1 (much faster than real-time)