Commit 08a0373a authored by Anthony Larcher's avatar Anthony Larcher
Browse files

sliding extraction

parent 74d5fff7
......@@ -164,9 +164,8 @@ if CUDA:
from .nnet import StatDataset
from .nnet import Xtractor
from .nnet import xtrain
from .nnet import extract_idmap
from .nnet import extract_parallel
from .nnet import extract_embeddings
from .nnet import extract_sliding_embedding
from .nnet import ResBlock
from .nnet import ResNet18
from .nnet import SincNet
......@@ -31,7 +31,7 @@ Copyright 2014-2020 Anthony Larcher and Sylvain Meignier
from .feed_forward import FForwardNetwork
from .feed_forward import kaldi_to_hdf5
from .xsets import XvectorMultiDataset, XvectorDataset, StatDataset
from .xvector import Xtractor, xtrain, extract_idmap, extract_parallel, extract_embeddings
from .xvector import Xtractor, xtrain, extract_idmap, extract_sliding_embedding
from .res_net import ResBlock, ResNet18
from .rawnet import prepare_voxceleb1, Vox1Set, PreEmphasis
from .sincnet import SincNet
......@@ -579,7 +579,7 @@ def extract_sliding_embedding(idmap_name,
# Compute the number of chunks to process
chunk_starts = numpy.arange(start,
stop - int(sample_rate * window_length),
int(sample_rate * window_length * (1. - overlap)))
int(sample_rate * (window_length - overlap)))
# Create a numpy array to store the current x-vectors
model_names.append(numpy.array([mod, ] * chunk_starts.shape[0]))
......@@ -602,7 +602,7 @@ def extract_sliding_embedding(idmap_name,
return embeddings
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