carrien / free-speech

Analysis and plotting code for speech neuroimaging experiments.
MIT License
4 stars 5 forks source link

Reorg forced aligner uev functionality and add to waverunner #20

Closed carrien closed 3 years ago

carrien commented 3 years ago

This update adds forced aligner user event functionality to waverunner, so that events are pulled in from existing TextGrids without needing to go through each trial in audioGUI.

I reorganized the way audioGUI pulls in the events to make it one contiguous code block, and copied it to waverunner (ideally we could make this into a function that both audioGUI and waverunner could call).

Comeani commented 3 years ago

Both audioGUI and waverunner work as expected on data without alignment.

AudioGUI refactoring works on flapper for both port and vsaSentence data (no difference between how it was running before besides the extra output to the command window about loading).

For waverunner, running it on data where wave_viewer_params.mat exists (at least one trial has been opened in audioGUI) works properly, prompting for overwrite of the existing trial file and then automatically continuing on with unopened trials displaying the trial number and 'Adding events from TextGrid'. However, if you tried to run waverunner without opening audioGUI first to set up wvp, line 49 would error because data(1).params.fs does not exist as a field (Not sure why this would be an issue specific to vsaSentence data, perhaps it's just been rare for anyone to run waveviewer on it's own without opening a trial in audioGUI first?). I committed a change that should fix the issue.