def __init__(self, experiment_dir, db_yml=None):
super(SpeakerEmbedding, self).__init__(
experiment_dir, db_yml=db_yml)
# architecture
if 'architecture' in self.config_:
architecture_name = self.config_['architecture']['name']
models = __import__('pyannote.audio.embedding.models',
fromlist=[architecture_name])
Architecture = getattr(models, architecture_name)
self.architecture_ = Architecture(
**self.config_['architecture'].get('params', {}))
# approach
if 'approach' in self.config_:
approach_name = self.config_['approach']['name']
approaches = __import__('pyannote.audio.embedding.approaches',
fromlist=[approach_name])
Approach = getattr(approaches, approach_name)
self.approach_ = Approach(
**self.config_['approach'].get('params', {}))
# (5, None, None, False) ==> '5'
# (5, 1, None, False) ==> '1-5'
# (5, None, 2, False) ==> '5+2'
# (5, 1, 2, False) ==> '1-5+2'
# (5, None, None, True) ==> '5x'
评论列表
文章目录