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

◆ segment()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Kakshya::RegionGroup>
SpeechSegmentation MayaFlux::Yantra::SpeechSegmenter< InputType, OutputType >::segment ( std::span< const double > samples,
const SpeechSegmenterConfig & config )
inline

Segment samples under the given settings, without the Datum wrapper.

Parameters
samplesOne channel of 16 kHz samples.
configSettings for this call; the stored config is not used or changed.
Returns
The record of the run.
Exceptions
std::invalid_argumentWhen diagnose refuses the config.

Definition at line 291 of file SpeechSegmenter.hpp.

292 {
293 if (const std::string reason = diagnose(config); !reason.empty()) {
295 std::source_location::current(), "SpeechSegmenter: {}", reason);
296 }
297
300 if (samples.empty()) {
301 return record;
302 }
304 if (config.speech.measure) {
306 }
307 return record;
308 }
const Config & config() const
The stored config struct of type Config, or its defaults when none was set.
void find_speech(std::span< const double > samples, const SpeechSegmenterConfig &cfg, SpeechSegmentation &record)
void measure_speech(std::span< const double > samples, const SpeechSegmenterConfig &cfg, SpeechSegmentation &record)
static std::string diagnose(const SpeechSegmenterConfig &config)
Why a config cannot be segmented with.
The speech intervals of a whole mono 16 kHz recording.

Referenced by MayaFlux::Yantra::SpeechSegmenter< std::vector< Kakshya::DataVariant >, Kakshya::RegionGroup >::extract_implementation().

Here is the caller graph for this function: