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

◆ PhonemeExtractor()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Kakshya::CompositeArray>
MayaFlux::Yantra::PhonemeExtractor< InputType, OutputType >::PhonemeExtractor ( const Kakshya::TensorSet & vad_weights,
const Kakshya::TensorSet & phoneme_weights,
PhonemeExtractorConfig config = {} )
inline

Construct from the weights of both networks.

Parameters
vad_weightsTensors of Silero VAD at 16 kHz, as in silero_vad_16k.safetensors.
phoneme_weightsTensors of the HuBERT phoneme network, as in hubert_base_phoneme_en.safetensors.
configExtraction settings.
Exceptions
std::invalid_argumentWhen diagnose refuses the config, or either weight set is refused by its network.

Definition at line 168 of file PhonemeExtractor.hpp.

168 {})
171 {
172 if (const std::string reason = diagnose(config); !reason.empty()) {
174 std::source_location::current(), "PhonemeExtractor: {}", reason);
175 }
177 }
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.
static std::string diagnose(const PhonemeExtractorConfig &config)
Why a config cannot be extracted with.
static PhonemeAnalyzerConfig phoneme_settings(const PhonemeExtractorConfig &config)
The phonemes of a whole mono 16 kHz recording, with the pauses between speech taken out.