a69768f10b30b09f987d287bdb5af7e09d520728,scripts/speech_activity_detection.py,,,#,437
Before Change
arguments = docopt(__doc__, version="Speech activity detection")
preprocessors = {}
if "<wav_template>" in arguments:
preprocessors = {"wav": arguments["<wav_template>"]}
if "<database.task.protocol>" in arguments:
protocol = arguments["<database.task.protocol>"]
database_name, task_name, protocol_name = protocol.split(".")
database = get_database(database_name, preprocessors=preprocessors)
protocol = database.get_protocol(task_name, protocol_name)
subset = arguments["--subset"]
if arguments["train"]:
experiment_dir = arguments["<experiment_dir>"]
if subset is None:
subset = "train"
train_dir = experiment_dir + "/train/" + arguments["<database.task.protocol>"] + "." + subset
train(protocol, experiment_dir, train_dir, subset=subset)
if arguments["tune"]:
train_dir = arguments["<train_dir>"]
if subset is None:
subset = "development"
beta = float(arguments.get("--recall"))
tune_dir = train_dir + "/tune/" + arguments["<database.task.protocol>"] + "." + subset
res = tune(protocol, train_dir, tune_dir, beta=beta, subset=subset)
if arguments["apply"]:
tune_dir = arguments["<tune_dir>"]
After Change
if __name__ == "__main__":
arguments = docopt(__doc__, version="Speech activity detection")
db_yml = os.path.expanduser(arguments["--database"])
preprocessors = {"wav": FileFinder(db_yml)}
if "<database.task.protocol>" in arguments:
protocol = arguments["<database.task.protocol>"]
database_name, task_name, protocol_name = protocol.split(".")
database = get_database(database_name, preprocessors=preprocessors)
protocol = database.get_protocol(task_name, protocol_name)
subset = arguments["--subset"]
if arguments["train"]:
experiment_dir = arguments["<experiment_dir>"]
if subset is None:
subset = "train"
train_dir = experiment_dir + "/train/" + arguments["<database.task.protocol>"] + "." + subset
train(protocol, experiment_dir, train_dir, subset=subset)
if arguments["tune"]:
train_dir = arguments["<train_dir>"]
if subset is None:
subset = "development"
beta = float(arguments.get("--recall"))
tune_dir = train_dir + "/tune/" + arguments["<database.task.protocol>"] + "." + subset
res = tune(protocol, train_dir, tune_dir, beta=beta, subset=subset)
if arguments["apply"]:
tune_dir = arguments["<tune_dir>"]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 27
Instances
Project Name: pyannote/pyannote-audio
Commit Name: a69768f10b30b09f987d287bdb5af7e09d520728
Time: 2016-12-02
Author: bredin@limsi.fr
File Name: scripts/speech_activity_detection.py
Class Name:
Method Name:
Project Name: pyannote/pyannote-audio
Commit Name: a69768f10b30b09f987d287bdb5af7e09d520728
Time: 2016-12-02
Author: bredin@limsi.fr
File Name: scripts/speech_activity_detection.py
Class Name:
Method Name:
Project Name: pyannote/pyannote-audio
Commit Name: a69768f10b30b09f987d287bdb5af7e09d520728
Time: 2016-12-02
Author: bredin@limsi.fr
File Name: scripts/change_detection.py
Class Name:
Method Name:
Project Name: pyannote/pyannote-audio
Commit Name: a69768f10b30b09f987d287bdb5af7e09d520728
Time: 2016-12-02
Author: bredin@limsi.fr
File Name: scripts/speaker_embedding.py
Class Name:
Method Name: