Codes used in the paper "A tradeoff between acoustic and linguistic feature encoding in spoken language comprehension" eLife2023;12:e82386 DOI: https://doi.org/10.7554/eLife.82386
- Generate .csv files that contains word and phoneme onsets of stories
- Run WebMaus forced aligner to generate .TextGrid files
- Run extract_phonemes_timing.py
- Run extract_word_timing.py
- Run word_phoneme_bridge.py
- Generate Cohor Model, add word frequencies and word entropy by using GPT2 model
- Run Clean_freq_file.py for both Dutch and French
- Run Cohort_model.py for both Dutch and French
- Run Word_entropy_GPT.py for both Dutch and French
- Manually correct for the missing word frequency values by replacing NaN values with the mean frequency
- Run Word_entropy_low_vs_high.py
- Run Generate_High_Low_entropy_cont_arrays.py
- Generate Predictors
- Run make_gammatone.py
- Run make_gammatone_predictors.py
- Run make_word_predictors.py
- Generate TRF models
- Run estimate_trfs.py from Scripts_for_publication/TRFs/Generate_TRF_models/sub001/ (In utils_TRF.py set Sources_saved = False for the first time you run the TRF model so it saves the source reconstructed signal for the next TRF models. Then set it to True)
- Accuracy Analysis
- Run Whole_brain_accuracies_basic_models.py, Word_entropy_effect_acoustic_features.py and Word_entropy_effect_phoneme_features.py to generate .csv files.
- Run LMM in R for further analysis
- TRF Weights Statistical Analysis
- Run ANOVA_weigths_all_features.py and ANOVA_weigths_phoneme_features.py for Part 1 and Part 2.
- Run Visualize_brains_all_phoneme_features.py to generate contrast on brain surface and the statistical analysis report.
- Generate TRF graphs
- Run TRF_LH.py and TRF_RH.py for Part 1 and Part 2