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

◆ VadAnalyzer()

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

Construct from the network weights.

Parameters
weightsThe tensors of the network. Silero VAD at 16 kHz is the one supported, as in silero_vad_16k.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 109 of file VadAnalyzer.hpp.

109 {})
110 {
111 if (const std::string reason = diagnose(config); !reason.empty()) {
113 std::source_location::current(), "VadAnalyzer: {}", reason);
114 }
117 std::source_location::current(), "VadAnalyzer: {}", reason);
118 }
121 }
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 VadAnalyzerConfig &config)
Why a config cannot be analysed.
Whether each 32 ms chunk of a mono 16 kHz stream is voice activity, from a learned network.