UXInteract / task_031 /instruction.md
DojiSum's picture
Publish the current 141-task UXInteract release
ef987bb verified
|
Raw History Blame Contribute Delete
1.71 kB
# Cepstral comparison of neutral and happy speech
Analyze the local WAV files in `Audio_Speech_Actors_01-24/` with `python3 analyze_ravdess.py` from the project root. Do not download audio or use external services.
## Analysis
Traverse nested directories for WAV files. Use the third hyphen-separated filename field as the emotion code: `01` is neutral, `03` is happy. Ignore other emotions.
For each selected file, derive a time series of 13 MFCC-style coefficients from its PCM samples: extract spectral/filterbank energies, apply a log and cosine transform, then average coefficients over time. A standard offline MFCC library or an equivalent approximation is acceptable; coefficients must reflect spectral information rather than repeat a single measure of energy. Average the per-file vectors with equal weight within each emotion, regardless of file length. Compute the absolute difference of those two mean vectors.
## Output
Print exactly four lines to stdout (diagnostics may go to stderr):
```text
neutral_count: X
happy_count: Y
mfcc_diff: [d1, d2, ..., d13]
max_diff_dim: D
```
Counts are integers. List 13 nonnegative finite differences with exactly three decimal places. `D` is the one-based index of the largest displayed difference, breaking ties in favor of the lowest index.
## Acceptance Checklist
- Nested target files count toward the correct emotion; other emotion codes do not affect the result.
- Differences depend on the spectra, not just amplitude, and are invariant when the two populations are swapped. Identical populations yield zero differences.
- The four-line output has the specified format and the maximum dimension agrees with the reported values and tie rule.