kaldi.ivector¶
Functions
agglomerative_cluster | 
Calls C++ function | 
compute_vad_energy | 
Calls C++ function | 
estimate_ivectors_online | 
Obtains periodically an estimate of the iVector including all frames up to that point. | 
Classes
AgglomerativeClusterer | 
CLIF wrapper for ::kaldi::AgglomerativeClusterer | 
AhcCluster | 
CLIF wrapper for ::kaldi::AhcCluster | 
IvectorEstimationOptions | 
Options for estimating iVectors, during both trainning and test. | 
IvectorExtractor | 
CLIF wrapper for ::kaldi::IvectorExtractor | 
IvectorExtractorEstimationOptions | 
CLIF wrapper for ::kaldi::IvectorExtractorEstimationOptions | 
IvectorExtractorOptions | 
CLIF wrapper for ::kaldi::IvectorExtractorOptions | 
IvectorExtractorStats | 
CLIF wrapper for ::kaldi::IvectorExtractorStats | 
IvectorExtractorStatsOptions | 
CLIF wrapper for ::kaldi::IvectorExtractorStatsOptions | 
IvectorExtractorUtteranceStats | 
Stats for a particular utterance, i.e., the sufficient stats for estimating an iVector | 
LogisticRegression | 
CLIF wrapper for ::kaldi::LogisticRegression | 
LogisticRegressionConfig | 
CLIF wrapper for ::kaldi::LogisticRegressionConfig | 
OnlineIvectorEstimationStats | 
CLIF wrapper for ::kaldi::OnlineIvectorEstimationStats | 
Plda | 
CLIF wrapper for ::kaldi::Plda | 
PldaConfig | 
CLIF wrapper for ::kaldi::PldaConfig | 
PldaEstimationConfig | 
CLIF wrapper for ::kaldi::PldaEstimationConfig | 
PldaStats | 
CLIF wrapper for ::kaldi::PldaStats | 
PldaUnsupervisedAdaptor | 
CLIF wrapper for ::kaldi::PldaUnsupervisedAdaptor | 
PldaUnsupervisedAdaptorConfig | 
CLIF wrapper for ::kaldi::PldaUnsupervisedAdaptorConfig | 
VadEnergyOptions | 
CLIF wrapper for ::kaldi::VadEnergyOptions | 
- 
class 
kaldi.ivector.AgglomerativeClusterer¶ CLIF wrapper for ::kaldi::AgglomerativeClusterer
- 
cluster() → list<int>¶ Calls C++ function void ::kaldi::AgglomerativeClusterer::Cluster(::std::vector< ::int32>*)
- 
 
- 
class 
kaldi.ivector.AhcCluster¶ CLIF wrapper for ::kaldi::AhcCluster
- 
id¶ C++ ::int32 AhcCluster.id
- 
parent1¶ C++ ::int32 AhcCluster.parent1
- 
parent2¶ C++ ::int32 AhcCluster.parent2
- 
size¶ C++ ::int32 AhcCluster.size
- 
utt_ids¶ C++ ::std::vector< ::int32> AhcCluster.utt_ids
- 
 
- 
class 
kaldi.ivector.IvectorEstimationOptions¶ Options for estimating iVectors, during both trainning and test.
- 
acoustic_weight¶ C++ double IvectorEstimationOptions.acoustic_weight
- 
max_count¶ C++ double IvectorEstimationOptions.max_count
- 
 
- 
class 
kaldi.ivector.IvectorExtractor¶ CLIF wrapper for ::kaldi::IvectorExtractor
- 
feat_dim() → int¶ Calls C++ function int ::kaldi::IvectorExtractor::FeatDim()
- 
get_acoustic_auxf_gconst(utt_stats:IvectorExtractorUtteranceStats) → float¶ Returns the part of the acoustic auxf that relates to the gconsts of the Gaussian.
- 
get_acoustic_auxf_mean(utt_stats:IvectorExtractorUtteranceStats, mean:DoubleVectorBase, var:DoubleSpMatrix=default) → float¶ Returns just the part of the acoustic auxf that relates to the speaker-dependent means
- 
get_acoustic_auxf_variance(utt_stats:IvectorExtractorUtteranceStats) → float¶ Returns just the part of the acoustic auxf that relates to the variance of the utt_stats.
- 
get_acoustic_auxf_weight(utt_stats:IvectorExtractorUtteranceStats, mean:DoubleVectorBase, var:DoubleSpMatrix=default) → float¶ Returns the part of the acoustic auxf that relates to the Gaussian-specific weights.
- 
get_auxf(utt_stats:IvectorExtractorUtteranceStats, mean:DoubleVectorBase, var:DoubleSpMatrix=default) → float¶ Returns the data-dependent part of the log-likelihood objective function, summed over frames.
- 
get_ivector_dist_mean(utt_stats:IvectorExtractorUtteranceStats, linear:DoubleVectorBase, quadratic:DoubleSpMatrix)¶ Get the linear and quadratic terms in the distribution over iVectors
- 
get_ivector_dist_prior(utt_stats:IvectorExtractorUtteranceStats, linear:DoubleVectorBase, quadratic:DoubleSpMatrix)¶ Gets the linear and quadratic terms in the distribution over iVectors that arise from the prior.
- 
get_ivector_dist_weight(utt_stats:IvectorExtractorUtteranceStats, mean:DoubleVectorBase, linear:DoubleVectorBase, quadratic:DoubleSpMatrix)¶ Gets the linear and quadratic terms in the distribution over iVectors that arise from the weights
- 
get_ivector_distribution(utt_stats:IvectorExtractorUtteranceStats, mean:DoubleVectorBase, var:DoubleSpMatrix)¶ Gets the distribution over ivectors (or the Gaussian approximation).
Parameters: - utt_stats (
IvectorExtractorUtteranceStats) – stats for a particular utterance - mean (
kaldi.matrix.VectorBase) – output means - ( (var) – class::
kaldi.matrix.packed.SpMatrix): None if not needed, else must be the correct dimension (ivector_dim()) 
- utt_stats (
 
- 
get_prior_auxf(mean:DoubleVectorBase, var:DoubleSpMatrix=default) → float¶ Returns the prior-related part of the log-likelihood objective function.
- 
ivector_dependent_weights() → bool¶ Calls C++ function bool ::kaldi::IvectorExtractor::IvectorDependentWeights()
- 
ivector_dim() → int¶ Calls C++ function int ::kaldi::IvectorExtractor::IvectorDim()
- 
new_with_params(opts:IvectorExtractorOptions, fgmm:FullGmm) → IvectorExtractor¶ Calls C++ function std::unique_ptr<::kaldi::IvectorExtractor> ::kaldi::IvectorExtractor::IvectorExtractor(::kaldi::IvectorExtractorOptions, ::kaldi::FullGmm)
- 
num_gauss() → int¶ Calls C++ function int ::kaldi::IvectorExtractor::NumGauss()
- 
prior_offset() → float¶ Offset of first dimension.
- 
read(os:istream, binary:bool)¶ Calls C++ function void ::kaldi::IvectorExtractor::Read(::std::basic_istream<char, ::std::char_traits<char> >, bool)
- 
write(os:ostream, binary:bool)¶ Calls C++ function void ::kaldi::IvectorExtractor::Write(::std::basic_ostream<char, ::std::char_traits<char> >, bool)
- 
 
- 
class 
kaldi.ivector.IvectorExtractorEstimationOptions¶ CLIF wrapper for ::kaldi::IvectorExtractorEstimationOptions
- 
diagonalize¶ C++ bool IvectorExtractorEstimationOptions.diagonalize
- 
gaussian_min_count¶ C++ double IvectorExtractorEstimationOptions.gaussian_min_count
- 
num_threads¶ C++ ::int32 IvectorExtractorEstimationOptions.num_threads
- 
register(opts:OptionsItf)¶ Calls C++ function void ::kaldi::IvectorExtractorEstimationOptions::Register(::kaldi::OptionsItf *)
- 
variance_floor_factor¶ C++ double IvectorExtractorEstimationOptions.variance_floor_factor
- 
 
- 
class 
kaldi.ivector.IvectorExtractorOptions¶ CLIF wrapper for ::kaldi::IvectorExtractorOptions
- 
ivector_dim¶ C++ int IvectorExtractorOptions.ivector_dim
- 
num_iters¶ C++ int IvectorExtractorOptions.num_iters
- 
register(opts:OptionsItf)¶ Calls C++ function void ::kaldi::IvectorExtractorOptions::Register(::kaldi::OptionsItf *)
- 
use_weights¶ C++ bool IvectorExtractorOptions.use_weights
- 
 
- 
class 
kaldi.ivector.IvectorExtractorStats¶ CLIF wrapper for ::kaldi::IvectorExtractorStats
- 
acc_stats_for_utterance(extractor:IvectorExtractor, feats:MatrixBase, post:list<list<tuple<int, float>>>)¶ Calls C++ function void ::kaldi::IvectorExtractorStats::AccStatsForUtterance(::kaldi::IvectorExtractor, ::kaldi::MatrixBase<float>, ::kaldi::Posterior)
- 
add(other:IvectorExtractorStats)¶ Calls C++ function void ::kaldi::IvectorExtractorStats::Add(::kaldi::IvectorExtractorStats)
- 
auxf_per_frame() → float¶ Calls C++ function double ::kaldi::IvectorExtractorStats::AuxfPerFrame()
- 
ivector_variance_diagnostic(extractor:IvectorExtractor)¶ Prints the proportion of the variance explained by the Ivector model versus the Gaussians.
- 
new(extractor:IvectorExtractor, stats_opts:IvectorExtractorStatsOptions) → IvectorExtractorStats¶ Calls C++ function std::unique_ptr<::kaldi::IvectorExtractorStats> ::kaldi::IvectorExtractorStats::IvectorExtractorStats(::kaldi::IvectorExtractor, ::kaldi::IvectorExtractorStatsOptions)
- 
read(os:istream, binary:bool)¶ Calls C++ function void ::kaldi::IvectorExtractorStats::Read(::std::basic_istream<char, ::std::char_traits<char> >, bool)
- 
update(opts:IvectorExtractorEstimationOptions, extractor:IvectorExtractor) → float¶ Returns the objf improvement per frame
- 
write(os:ostream, binary:bool)¶ Calls C++ function void ::kaldi::IvectorExtractorStats::Write(::std::basic_ostream<char, ::std::char_traits<char> >, bool)
- 
 
- 
class 
kaldi.ivector.IvectorExtractorStatsOptions¶ CLIF wrapper for ::kaldi::IvectorExtractorStatsOptions
- 
cache_size¶ C++ int IvectorExtractorStatsOptions.cache_size
- 
compute_auxf¶ C++ bool IvectorExtractorStatsOptions.compute_auxf
- 
num_samples_for_weights¶ C++ ::int32 IvectorExtractorStatsOptions.num_samples_for_weights
- 
register(opts:OptionsItf)¶ Calls C++ function void ::kaldi::IvectorExtractorStatsOptions::Register(::kaldi::OptionsItf *)
- 
update_variances¶ C++ bool IvectorExtractorStatsOptions.update_variances
- 
 
- 
class 
kaldi.ivector.IvectorExtractorUtteranceStats¶ Stats for a particular utterance, i.e., the sufficient stats for estimating an iVector
- 
acc_stats(feats:MatrixBase, post:list<list<tuple<int, float>>>)¶ Calls C++ function void ::kaldi::IvectorExtractorUtteranceStats::AccStats(::kaldi::MatrixBase<float>, ::kaldi::Posterior)
- 
new_with_params(num_gauss:int, feat_dim:int, need_2nd_order_stats:bool) → IvectorExtractorUtteranceStats¶ Calls C++ function std::unique_ptr<::kaldi::IvectorExtractorUtteranceStats> ::kaldi::IvectorExtractorUtteranceStats::IvectorExtractorUtteranceStats(int, int, bool)
- 
num_frames() → float¶ Calls C++ function double ::kaldi::IvectorExtractorUtteranceStats::NumFrames()
- 
scale(scale:float)¶ Calls C++ function void ::kaldi::IvectorExtractorUtteranceStats::Scale(double)
- 
 
- 
class 
kaldi.ivector.LogisticRegression¶ CLIF wrapper for ::kaldi::LogisticRegression
- 
get_log_posteriors_matrix(xs:Matrix) → Matrix¶ Calculates the log posterior of the class label given the input xs
- 
get_log_posteriors_vector(x:Vector) → Vector¶ Calculates the log posterior of the class label given the input x.
- 
read(os:istream, binary:bool)¶ Calls C++ function void ::kaldi::LogisticRegression::Read(::std::basic_istream<char, ::std::char_traits<char> >, bool)
- 
scale_priors(prior_scales:Vector)¶ Calls C++ function void ::kaldi::LogisticRegression::ScalePriors(::kaldi::Vector<float>)
- 
train(xs:Matrix, ys:list<int>, conf:LogisticRegressionConfig)¶ xs and ys are the trainning data. Each row of xs is a vector corresponding to the class label in the same row of ys.
- 
write(os:ostream, binary:bool)¶ Calls C++ function void ::kaldi::LogisticRegression::Write(::std::basic_ostream<char, ::std::char_traits<char> >, bool)
- 
 
- 
class 
kaldi.ivector.LogisticRegressionConfig¶ CLIF wrapper for ::kaldi::LogisticRegressionConfig
- 
max_steps¶ C++ ::int32 LogisticRegressionConfig.max_steps
- 
mix_up¶ C++ ::int32 LogisticRegressionConfig.mix_up
- 
normalizer¶ C++ double LogisticRegressionConfig.normalizer
- 
power¶ C++ double LogisticRegressionConfig.power
- 
 
- 
class 
kaldi.ivector.OnlineIvectorEstimationStats¶ CLIF wrapper for ::kaldi::OnlineIvectorEstimationStats
- 
acc_stats(extractor:IvectorExtractor, feature:VectorBase, gauss_post:list<tuple<int, float>>)¶ Calls C++ function void ::kaldi::OnlineIvectorEstimationStats::AccStats(::kaldi::IvectorExtractor, ::kaldi::VectorBase<float>, ::std::vector< ::std::pair< ::int32, ::kaldi::BaseFloat> >)
- 
acc_stats_sequence(extractor:IvectorExtractor, features:MatrixBase, gauss_post:list<list<tuple<int, float>>>)¶ Calls C++ function void ::kaldi::OnlineIvectorEstimationStats::AccStats(::kaldi::IvectorExtractor, ::kaldi::MatrixBase<float>, ::std::vector< ::std::vector< ::std::pair< ::int32, ::kaldi::BaseFloat> > >)
- 
count() → float¶ Calls C++ function double ::kaldi::OnlineIvectorEstimationStats::Count()
- 
get_ivector(num_cg_iters:int, ivector:DoubleVectorBase)¶ Gets the current estimate of the iVector.
- 
ivector_dim() → int¶ Calls C++ function int ::kaldi::OnlineIvectorEstimationStats::IvectorDim()
- 
new_with_other(other:OnlineIvectorEstimationStats) → OnlineIvectorEstimationStats¶ Calls C++ function std::unique_ptr<::kaldi::OnlineIvectorEstimationStats> ::kaldi::OnlineIvectorEstimationStats::OnlineIvectorEstimationStats(::kaldi::OnlineIvectorEstimationStats)
- 
new_with_params(ivector_dim:int, prior_offset:float, max_count:float) → OnlineIvectorEstimationStats¶ Calls C++ function std::unique_ptr<::kaldi::OnlineIvectorEstimationStats> ::kaldi::OnlineIvectorEstimationStats::OnlineIvectorEstimationStats(int, float, float)
- 
num_frames() → float¶ Calls C++ function double ::kaldi::OnlineIvectorEstimationStats::NumFrames()
- 
objf_change(ivector:DoubleVectorBase) → float¶ Returns the change in objective function per frame from using the default value.
- 
prior_offset() → float¶ Calls C++ function double ::kaldi::OnlineIvectorEstimationStats::PriorOffset()
- 
read(os:istream, binary:bool)¶ Calls C++ function void ::kaldi::OnlineIvectorEstimationStats::Read(::std::basic_istream<char, ::std::char_traits<char> >, bool)
- 
scale(scale:float)¶ Calls C++ function void ::kaldi::OnlineIvectorEstimationStats::Scale(double)
- 
write(os:ostream, binary:bool)¶ Calls C++ function void ::kaldi::OnlineIvectorEstimationStats::Write(::std::basic_ostream<char, ::std::char_traits<char> >, bool)
- 
 
- 
class 
kaldi.ivector.Plda¶ CLIF wrapper for ::kaldi::Plda
- 
apply_transform(in_transform:DoubleMatrix)¶ Calls C++ function void ::kaldi::Plda::ApplyTransform(::kaldi::Matrix<double>)
- 
dim() → int¶ Calls C++ function int ::kaldi::Plda::Dim()
- 
from_other(other:Plda) → Plda¶ Calls C++ function std::unique_ptr<::kaldi::Plda> ::kaldi::Plda::Plda(::kaldi::Plda)
- 
log_likelihood_ratio(transformed_train_ivector:DoubleVectorBase, num_train_utts:int, transformed_test_ivector:DoubleVectorBase) → float¶ Calls C++ function double ::kaldi::Plda::LogLikelihoodRatio(::kaldi::VectorBase<double>, int, ::kaldi::VectorBase<double>)
- 
read(os:istream, binary:bool)¶ Calls C++ function void ::kaldi::Plda::Read(::std::basic_istream<char, ::std::char_traits<char> >, bool)
- 
smooth_within_class_covariance(smoothing_factor:float)¶ Calls C++ function void ::kaldi::Plda::SmoothWithinClassCovariance(double)
- 
transform_ivector(config:PldaConfig, ivector:DoubleVectorBase, num_examples:int, transformed_ivector:DoubleVectorBase) → float¶ Calls C++ function double ::kaldi::Plda::TransformIvector(::kaldi::PldaConfig, ::kaldi::VectorBase<double>, int, ::kaldi::VectorBase<double> *)
- 
transform_ivector_single(config:PldaConfig, ivector:VectorBase, num_examples:int, transformed_ivector:VectorBase) → float¶ Calls C++ function float ::kaldi::Plda::TransformIvector(::kaldi::PldaConfig, ::kaldi::VectorBase<float>, int, ::kaldi::VectorBase<float> *)
- 
write(os:ostream, binary:bool)¶ Calls C++ function void ::kaldi::Plda::Write(::std::basic_ostream<char, ::std::char_traits<char> >, bool)
- 
 
- 
class 
kaldi.ivector.PldaConfig¶ CLIF wrapper for ::kaldi::PldaConfig
- 
normalize_length¶ C++ bool PldaConfig.normalize_length
- 
register(opts:OptionsItf)¶ Calls C++ function void ::kaldi::PldaConfig::Register(::kaldi::OptionsItf *)
- 
simple_length_norm¶ C++ bool PldaConfig.simple_length_norm
- 
 
- 
class 
kaldi.ivector.PldaEstimationConfig¶ CLIF wrapper for ::kaldi::PldaEstimationConfig
- 
num_em_iters¶ C++ ::int32 PldaEstimationConfig.num_em_iters
- 
 
- 
class 
kaldi.ivector.PldaStats¶ CLIF wrapper for ::kaldi::PldaStats
- 
add_samples(weight:float, group:DoubleMatrix)¶ Calls C++ function void ::kaldi::PldaStats::AddSamples(double, ::kaldi::Matrix<double>)
- 
dim() → int¶ Calls C++ function int ::kaldi::PldaStats::Dim()
- 
init(dim:int)¶ Calls C++ function void ::kaldi::PldaStats::Init(int)
- 
is_sorted() → bool¶ Calls C++ function bool ::kaldi::PldaStats::IsSorted()
- 
sort()¶ Calls C++ function void ::kaldi::PldaStats::Sort()
- 
 
- 
class 
kaldi.ivector.PldaUnsupervisedAdaptor¶ CLIF wrapper for ::kaldi::PldaUnsupervisedAdaptor
- 
add_double_stats(weight:float, ivector:DoubleVector)¶ Calls C++ function void ::kaldi::PldaUnsupervisedAdaptor::AddStats(double, ::kaldi::Vector<double>)
- 
add_stats(weight:float, ivector:Vector)¶ Calls C++ function void ::kaldi::PldaUnsupervisedAdaptor::AddStats(double, ::kaldi::Vector<float>)
- 
 
- 
class 
kaldi.ivector.PldaUnsupervisedAdaptorConfig¶ CLIF wrapper for ::kaldi::PldaUnsupervisedAdaptorConfig
- 
between_covar_scale¶ C++ ::kaldi::BaseFloat PldaUnsupervisedAdaptorConfig.between_covar_scale
- 
mean_diff_scale¶ C++ ::kaldi::BaseFloat PldaUnsupervisedAdaptorConfig.mean_diff_scale
- 
register(opts:OptionsItf)¶ Calls C++ function void ::kaldi::PldaUnsupervisedAdaptorConfig::Register(::kaldi::OptionsItf *)
- 
within_covar_scale¶ C++ ::kaldi::BaseFloat PldaUnsupervisedAdaptorConfig.within_covar_scale
- 
 
- 
class 
kaldi.ivector.VadEnergyOptions¶ CLIF wrapper for ::kaldi::VadEnergyOptions
- 
register(opts:OptionsItf)¶ Calls C++ function void ::kaldi::VadEnergyOptions::Register(::kaldi::OptionsItf *)
- 
vad_energy_mean_scale¶ C++ ::kaldi::BaseFloat VadEnergyOptions.vad_energy_mean_scale
- 
vad_energy_threshold¶ C++ ::kaldi::BaseFloat VadEnergyOptions.vad_energy_threshold
- 
vad_frames_context¶ C++ ::int32 VadEnergyOptions.vad_frames_context
- 
vad_proportion_threshold¶ C++ ::kaldi::BaseFloat VadEnergyOptions.vad_proportion_threshold
- 
 
- 
kaldi.ivector.agglomerative_cluster(costs:Matrix, thresh:float, min_clust:int) → list<int>¶ Calls C++ function void ::kaldi::AgglomerativeCluster(::kaldi::Matrix<float>, float, int, ::std::vector< ::int32>*)
- 
kaldi.ivector.compute_vad_energy(opts:VadEnergyOptions, input_features:MatrixBase) → Vector¶ Calls C++ function void ::kaldi::ComputeVadEnergy(::kaldi::VadEnergyOptions, ::kaldi::MatrixBase<float>, ::kaldi::Vector<float>*)
- 
kaldi.ivector.estimate_ivectors_online(feats:Matrix, post:list<list<tuple<int, float>>>, extractor:IvectorExtractor, ivector_period:int, num_cg_iters:int, max_count:float) -> (objf_improvement:float, ivectors:Matrix)¶ Obtains periodically an estimate of the iVector including all frames up to that point.