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

◆ SpeechSegmenter()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Kakshya::RegionGroup>
MayaFlux::Yantra::SpeechSegmenter< InputType, OutputType >::SpeechSegmenter ( const Kakshya::TensorSet & vad_weights,
SpeechSegmenterConfig config = {} )
inlineexplicit

Construct from the weights of the speech network.

Parameters
vad_weightsTensors of Silero VAD at 16 kHz, as in silero_vad_16k.safetensors.
configSegmentation settings.
Exceptions
std::invalid_argumentWhen diagnose refuses the config, or the weights are refused by the network.

Definition at line 247 of file SpeechSegmenter.hpp.

247 {})
249 {
250 if (const std::string reason = diagnose(config); !reason.empty()) {
252 std::source_location::current(), "SpeechSegmenter: {}", reason);
253 }
255 }
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 VadAnalyzerConfig vad_settings(const SpeechSegmenterConfig &config)
static std::string diagnose(const SpeechSegmenterConfig &config)
Why a config cannot be segmented with.
The speech intervals of a whole mono 16 kHz recording.