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

◆ diagnose()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Eigen::MatrixXd>
std::string MayaFlux::Yantra::VadAnalyzer< InputType, OutputType >::diagnose ( const VadAnalyzerConfig & config)
inlinestaticnodiscard

Why a config cannot be analysed.

Returns
The reason, empty when the config is usable: its sample_rate is the 16000 Hz the network runs at.

Definition at line 132 of file VadAnalyzer.hpp.

133 {
134 const auto framing = SileroVadModel::framing();
135 if (config.sample_rate != static_cast<double>(framing.sample_rate)) {
136 return std::format("sample_rate {} is not the {} Hz the network runs at; convert the input first, for example with Kinesis::Discrete::Resampler",
137 config.sample_rate, framing.sample_rate);
138 }
139 return {};
140 }
const Config & config() const
The stored config struct of type Config, or its defaults when none was set.
static StreamFraming framing() noexcept
The framing of this network.
Whether each 32 ms chunk of a mono 16 kHz stream is voice activity, from a learned network.

Referenced by MayaFlux::Yantra::VadAnalyzer< std::vector< Kakshya::DataVariant >, Eigen::MatrixXd >::analyze_implementation(), and MayaFlux::Yantra::VadAnalyzer< std::vector< Kakshya::DataVariant >, Eigen::MatrixXd >::record().

Here is the caller graph for this function: