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

◆ build_output()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Kakshya::RegionGroup>
output_type MayaFlux::Yantra::SpeechSegmenter< InputType, OutputType >::build_output ( const SpeechSegmentation & record,
std::span< const double > samples,
DataStructureInfo & info )
inlineprivate

Definition at line 411 of file SpeechSegmenter.hpp.

412 {
415 intervals.intervals = record.speech;
417 output.data = interval_regions(intervals, 0, 0, "speech");
418 return output;
419 } else {
421 return this->convert_result(channel, info);
422 }
423 }
output_type convert_result(std::vector< std::vector< double > > &result_data, DataStructureInfo &metadata)
Convert processed double data back to OutputType using metadata and optional callback.
The speech intervals of a whole mono 16 kHz recording.
std::vector< double > slice_intervals(std::span< const double > data, const std::vector< std::pair< size_t, size_t > > &intervals)
Copy data from a set of half-open intervals into a flat vector.
Definition Extract.cpp:63
Kakshya::RegionGroup interval_regions(const ChannelIntervals &intervals, uint32_t first_channel, uint32_t last_channel, std::string name="intervals")
One region per interval, spanning the given channels.

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

Here is the caller graph for this function: