MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ PhonemeAnalyzer()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Eigen::MatrixXd>
MayaFlux::Yantra::PhonemeAnalyzer< InputType, OutputType >::PhonemeAnalyzer ( const Kakshya::TensorSet & weights,
PhonemeAnalyzerConfig config = {} )
inlineexplicit

Construct from the network weights.

Parameters
weightsThe tensors of the network, as in hubert_base_phoneme_en.safetensors.
configAnalysis settings.
Exceptions
std::invalid_argumentWhen diagnose refuses the config, or the weights are missing a tensor or one has the wrong shape.

Definition at line 245 of file PhonemeAnalyzer.hpp.

245 {})
246 {
247 if (const std::string reason = diagnose(config); !reason.empty()) {
249 std::source_location::current(), "PhonemeAnalyzer: {}", reason);
250 }
253 std::source_location::current(), "PhonemeAnalyzer: {}", reason);
254 }
257 }
const Config & config() const
The stored config struct of type Config, or its defaults when none was set.
void set_config(Config config)
Stores a config struct, whole, under its own type.
std::shared_ptr< const Kakshya::TensorSet > m_weights
static std::string diagnose(const PhonemeAnalyzerConfig &config)
Why a config cannot be analysed.
Which phoneme is spoken near each frame of a mono 16 kHz utterance, from a learned network.