kaldi.ivector — PyKaldi 0.1.1 documentation
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
-
CLIF wrapper for ::kaldi::IvectorExtractor
Calls C++ function int ::kaldi::IvectorExtractor::FeatDim()
Returns the part of the acoustic auxf that relates to the gconsts of the Gaussian.
Returns just the part of the acoustic auxf that relates to the speaker-dependent means
Returns just the part of the acoustic auxf that relates to the variance of the utt_stats.
Returns the part of the acoustic auxf that relates to the Gaussian-specific weights.
Returns the data-dependent part of the log-likelihood objective function, summed over frames.
Get the linear and quadratic terms in the distribution over iVectors
Gets the linear and quadratic terms in the distribution over iVectors that arise from the prior.
Gets the linear and quadratic terms in the distribution over iVectors that arise from the weights
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 (
Returns the prior-related part of the log-likelihood objective function.
Calls C++ function bool ::kaldi::IvectorExtractor::IvectorDependentWeights()
Calls C++ function int ::kaldi::IvectorExtractor::IvectorDim()
Calls C++ function std::unique_ptr<::kaldi::IvectorExtractor> ::kaldi::IvectorExtractor::IvectorExtractor(::kaldi::IvectorExtractorOptions, ::kaldi::FullGmm)
Calls C++ function int ::kaldi::IvectorExtractor::NumGauss()
Offset of first dimension.
Calls C++ function void ::kaldi::IvectorExtractor::Read(::std::basic_istream<char, ::std::char_traits<char> >, bool)
Calls C++ function void ::kaldi::IvectorExtractor::Write(::std::basic_ostream<char, ::std::char_traits<char> >, bool)
CLIF wrapper for ::kaldi::IvectorExtractorEstimationOptions
C++ bool IvectorExtractorEstimationOptions.diagonalize
C++ double IvectorExtractorEstimationOptions.gaussian_min_count
C++ ::int32 IvectorExtractorEstimationOptions.num_threads
Calls C++ function void ::kaldi::IvectorExtractorEstimationOptions::Register(::kaldi::OptionsItf *)
C++ double IvectorExtractorEstimationOptions.variance_floor_factor
CLIF wrapper for ::kaldi::IvectorExtractorOptions
C++ int IvectorExtractorOptions.ivector_dim
C++ int IvectorExtractorOptions.num_iters
Calls C++ function void ::kaldi::IvectorExtractorOptions::Register(::kaldi::OptionsItf *)
C++ bool IvectorExtractorOptions.use_weights
CLIF wrapper for ::kaldi::IvectorExtractorStats
Calls C++ function void ::kaldi::IvectorExtractorStats::AccStatsForUtterance(::kaldi::IvectorExtractor, ::kaldi::MatrixBase<float>, ::kaldi::Posterior)
Calls C++ function void ::kaldi::IvectorExtractorStats::Add(::kaldi::IvectorExtractorStats)
Calls C++ function double ::kaldi::IvectorExtractorStats::AuxfPerFrame()
Prints the proportion of the variance explained by the Ivector model versus the Gaussians.
Calls C++ function std::unique_ptr<::kaldi::IvectorExtractorStats> ::kaldi::IvectorExtractorStats::IvectorExtractorStats(::kaldi::IvectorExtractor, ::kaldi::IvectorExtractorStatsOptions)
Calls C++ function void ::kaldi::IvectorExtractorStats::Read(::std::basic_istream<char, ::std::char_traits<char> >, bool)
Returns the objf improvement per frame
Calls C++ function void ::kaldi::IvectorExtractorStats::Write(::std::basic_ostream<char, ::std::char_traits<char> >, bool)
CLIF wrapper for ::kaldi::IvectorExtractorStatsOptions
C++ int IvectorExtractorStatsOptions.cache_size
C++ bool IvectorExtractorStatsOptions.compute_auxf
C++ ::int32 IvectorExtractorStatsOptions.num_samples_for_weights
Calls C++ function void ::kaldi::IvectorExtractorStatsOptions::Register(::kaldi::OptionsItf *)
C++ bool IvectorExtractorStatsOptions.update_variances
Stats for a particular utterance, i.e., the sufficient stats for estimating an iVector
Calls C++ function void ::kaldi::IvectorExtractorUtteranceStats::AccStats(::kaldi::MatrixBase<float>, ::kaldi::Posterior)
Calls C++ function std::unique_ptr<::kaldi::IvectorExtractorUtteranceStats> ::kaldi::IvectorExtractorUtteranceStats::IvectorExtractorUtteranceStats(int, int, bool)
Calls C++ function double ::kaldi::IvectorExtractorUtteranceStats::NumFrames()
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.