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

◆ diagnose()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Kakshya::RegionGroup>
std::string MayaFlux::Yantra::SpeechSegmenter< InputType, OutputType >::diagnose ( const SpeechSegmenterConfig & config)
inlinestaticnodiscard

Why a config cannot be segmented with.

Returns
The reason, empty when usable.

Definition at line 271 of file SpeechSegmenter.hpp.

272 {
273 if (config.sample_rate != static_cast<double>(SileroVadModel::sample_rate)) {
274 return std::format("sample_rate {} is not the {} Hz the network runs at; convert the input first, for example with Kinesis::Discrete::resample",
276 }
277 if (!std::isfinite(config.speech.voicing_threshold) || config.speech.voicing_threshold <= 0.0) {
278 return "voicing_threshold must be finite and greater than 0";
279 }
280 const auto scan = speech_scan_settings(config.speech, 0);
282 }
const Config & config() const
The stored config struct of type Config, or its defaults when none was set.
The speech intervals of a whole mono 16 kHz recording.
std::string diagnose_interval_scan(const IntervalScanConfig &config)
Why a config cannot be scanned.
Kinesis::Discrete::IntervalScanConfig interval_scan_config(const IntervalScanSettings &settings, uint32_t length)
The host scan configuration of one column's settings over a stream of the given length.
IntervalExtractorConfig speech_scan_settings(const SpeechSettings &speech, size_t samples)
The interval scan settings of speech runs, for a recording of the given length.

Referenced by MayaFlux::Yantra::PhonemeExtractor< std::vector< Kakshya::DataVariant >, Kakshya::CompositeArray >::diagnose(), and MayaFlux::Yantra::SpeechSegmenter< std::vector< Kakshya::DataVariant >, Kakshya::RegionGroup >::segment().

Here is the caller graph for this function: