def acoustic_similarity_directories(directories, analysis_function, distance_function, stop_check=None, call_back=None, multiprocessing=True):
files = []<EOL>if call_back is not None:<EOL><INDENT>call_back('<STR_LIT>')<EOL>call_back(<NUM_LIT:0>, len(directories))<EOL>cur = <NUM_LIT:0><EOL><DEDENT>for d in directories:<EOL><INDENT>if not os.path.isdir(d):<EOL><INDENT>continue<EOL><DEDENT>if stop_check is not None and stop_check():<EOL><INDENT>return<EOL><DEDENT>if call_back is not None:<EOL><INDENT>cur += <NUM_LIT:1><EOL>if cur % <NUM_LIT:3> == <NUM_LIT:0>:<EOL><INDENT>call_back(cur)<EOL><DEDENT><DEDENT>files += [os.path.join(d, x) for x in os.listdir(d) if x.lower().endswith('<STR_LIT>')]<EOL><DEDENT>if len(files) == <NUM_LIT:0>:<EOL><INDENT>raise (ConchError("<STR_LIT>"))<EOL><DEDENT>if call_back is not None:<EOL><INDENT>call_back('<STR_LIT>')<EOL>call_back(<NUM_LIT:0>, len(files) * len(files))<EOL>cur = <NUM_LIT:0><EOL><DEDENT>path_mapping = list()<EOL>for x in files:<EOL><INDENT>for y in files:<EOL><INDENT>if stop_check is not None and stop_check():<EOL><INDENT>return<EOL><DEDENT>if call_back is not None:<EOL><INDENT>cur += <NUM_LIT:1><EOL>if cur % <NUM_LIT:20> == <NUM_LIT:0>:<EOL><INDENT>call_back(cur)<EOL><DEDENT><DEDENT>if not x.lower().endswith('<STR_LIT>'):<EOL><INDENT>continue<EOL><DEDENT>if not y.lower().endswith('<STR_LIT>'):<EOL><INDENT>continue<EOL><DEDENT>if x == y:<EOL><INDENT>continue<EOL><DEDENT>path_mapping.append((x, y))<EOL><DEDENT><DEDENT>result = acoustic_similarity_mapping(path_mapping, analysis_function, distance_function, stop_check, call_back, multiprocessing)<EOL>return result<EOL>
Analyze many directories.

Parameters
----------
directories : list of str
    List of fully specified paths to the directories to be analyzed