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

◆ speech_scan_settings()

IntervalExtractorConfig MayaFlux::Yantra::speech_scan_settings ( const SpeechSettings & speech,
size_t samples )
inlinenodiscard

The interval scan settings of speech runs, for a recording of the given length.

Scores are the probabilities of 512 sample chunks, and the leave threshold is the one IntervalExtractorConfig gives by default, as in Silero.

Definition at line 96 of file SpeechSegmenter.hpp.

97{
99 scan.scan.enter_threshold = speech.threshold;
100 scan.scan.samples_per_score = SileroVadModel::chunk_samples;
101 scan.scan.min_run = speech.min_speech;
102 scan.scan.min_gap = speech.min_silence;
103 scan.scan.padding = speech.padding;
104 scan.scan.max_run = speech.max_run;
105 scan.flush = true;
106 scan.length = static_cast<uint32_t>(samples);
107 return scan;
108}
static constexpr uint32_t chunk_samples
Settings of an IntervalExtractor.
double threshold
Speech probability at or above which speech starts.
uint32_t max_run
Longest speech interval in samples, 0 for no cap.
uint32_t min_speech
Shortest speech run kept, in samples.
uint32_t padding
Samples added on each side of a speech run.
uint32_t min_silence
Shortest silence that ends a speech run, in samples.

References MayaFlux::Yantra::SileroVadModel::chunk_samples, MayaFlux::Yantra::SpeechSettings::max_run, MayaFlux::Yantra::SpeechSettings::min_silence, MayaFlux::Yantra::SpeechSettings::min_speech, MayaFlux::Yantra::SpeechSettings::padding, and MayaFlux::Yantra::SpeechSettings::threshold.

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

Here is the caller graph for this function: