Commit 0fa85281 authored by Anthony Larcher's avatar Anthony Larcher
Browse files

cleaning

parent 9f28b58f
......@@ -222,7 +222,7 @@ class MelSpecFrontEnd(torch.nn.Module):
class RawPreprocessor(torch.nn.Module):
class (torch.nn.Module):
"""
"""
......
......@@ -416,7 +416,7 @@ class SincNet(torch.nn.Module):
#return output.transpose(1, 2)
return output
def dimension(self):
def dimension():
doc = "Output features dimension."
def fget(self):
......
......@@ -1227,7 +1227,6 @@ def extract_embeddings(idmap_name,
data_root_name,
device,
model_yaml=None,
speaker_number=None,
file_extension="wav",
transform_pipeline=None,
frame_shift=0.01,
......@@ -1255,8 +1254,7 @@ def extract_embeddings(idmap_name,
# Load the model
if isinstance(model_filename, str):
checkpoint = torch.load(model_filename, map_location=device)
if speaker_number is None:
speaker_number = checkpoint["speaker_number"]
speaker_number = checkpoint["speaker_number"]
if model_yaml is None:
model_archi = checkpoint["model_archi"]
else:
......@@ -1438,7 +1436,10 @@ def extract_sliding_embedding(idmap_name,
:return:
"""
# From the original IdMap, create the new one to extract x-vectors
input_idmap = IdMap(idmap_name)
if not isinstance(idmap_name, IdMap):
input_idmap = IdMap(idmap_name)
else:
input_idmap = idmap_name
# Create temporary lists
nb_chunks = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment