# generate the seed for this simulation
                        seed = int(np.random.randint(2**32, dtype=np.uint32))

                        # add the new combination to the list
                        args.append([
                            n_targets,
                            n_interferers,
                            n_mics,
                            sinr,
                            wav_files,
                            room_seed,
                            seed,
                        ])

    np.random.set_state(rng_state)

    return args


if __name__ == "__main__":

    rrtools.run(
        one_loop,
        generate_arguments,
        func_init=init,
        base_dir=base_dir,
        results_dir="data/",
        description=
        "Simulation for Independent Vector Extraction via Iterative SINR Maximization  (submitted to ICASSP 2020)",
    )
Ejemplo n.º 2
0
def parallel_loop(args):
    global parameters

    import time

    # split arguments
    timeout = args[0]
    key = args[1]

    time.sleep(timeout)

    return dict(key=key, timeout=timeout, secret=parameters['secret'])


def gen_args(parameters):

    timeouts = range(parameters['max_timeout'])
    keys = range(parameters['max_int'])

    return list(itertools.product(timeouts, keys))


if __name__ == '__main__':

    rrtools.run(parallel_loop,
                gen_args,
                func_init=init,
                base_dir=base_dir,
                results_dir='data/',
                description='Dummy test simulation')
Ejemplo n.º 3
0
from generate_samples import sampling, wav_read_center

# find the absolute path to this file
base_dir = os.path.abspath(os.path.split(__file__)[0])


def init(parameters):
    parameters["base_dir"] = base_dir


def one_loop(args):
    global parameters

    import sys
    sys.path.append(parameters["base_dir"])
    from simulation_loop import run

    return run(args, parameters)


if __name__ == "__main__":

    rrtools.run(
        one_loop,
        generate,
        func_init=init,
        base_dir=base_dir,
        results_dir="data/",
        description="Simulation for OverIVA",
    )
Ejemplo n.º 4
0
            # we don't do underdetermined
            if n_targets > n_mics:
                continue

            for rt60 in parameters['rt60_list'].keys():
                for sinr in parameters['sinr_list']:
                    for wav_files in all_wav_files:

                        # generate the seed for this simulation
                        seed = int(np.random.randint(2 ** 32, dtype=np.uint32))

                        # add the new combination to the list
                        args.append([n_targets, n_mics, rt60, sinr, wav_files, seed])
    
    np.random.set_state(rng_state)

    return args


if __name__ == '__main__':

    rrtools.run(
            one_loop,
            generate_arguments,
            func_init=init,
            base_dir=base_dir,
            results_dir='data/',
            description='Simulation for Multi-modal BSS with blinkies (ICASSP 2019)',
            )