# loadSoundTextgrid.praat form Parameters word inFolder_(where_the_files_to_be_loaded_are) 01.native.model.5 word extSound_(with_dot) .wav word extTextGrid_(with_dot) .TextGrid choice LoadAlso: 2 button with_TextGrid button without_TextGrid endform Create Strings as file list... fileListObj 'inFolder$'/*'extSound$' numFiles = Get number of strings for iFile to numFiles select Strings fileListObj fileName$ = Get string... iFile Read from file... 'inFolder$'/'fileName$' # Check if the corresponding textgrid needs to be loaded if loadAlso = 1 prefix$ = fileName$ - extSound$ textgridName$ = prefix$ + extTextGrid$ Read from file... 'inFolder$'/'textgridName$' endif endfor select Strings fileListObj Remove ########### END OF SCRIPT ################