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

◆ describe_frames()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = Eigen::MatrixXd>
void MayaFlux::Yantra::PhonemeAnalyzer< InputType, OutputType >::describe_frames ( PhonemeAnalysis & analysis)
inlinestaticprivate

Definition at line 443 of file PhonemeAnalyzer.hpp.

444 {
445 constexpr size_t classes = HubertPhonemeModel::classes;
446 analysis.best.reserve(analysis.frames);
447 analysis.frame_positions.reserve(analysis.frames);
449 for (size_t frame = 0; frame < analysis.frames; ++frame) {
450 const float* row = analysis.posteriors.data() + frame * classes;
451 const auto top = static_cast<uint32_t>(std::max_element(row, row + classes) - row);
453 analysis.best.push_back(top);
454 analysis.frame_positions.emplace_back(start, start + HubertPhonemeModel::frame_span);
456 analysis.events.push_back({ .phoneme = top, .frame = frame, .sample = start, .probability = row[top] });
457 }
458 previous = top;
459 }
460 }
Which phoneme is spoken near each frame of a mono 16 kHz utterance, from a learned network.

Referenced by MayaFlux::Yantra::PhonemeAnalyzer< std::vector< Kakshya::DataVariant >, Eigen::MatrixXd >::analyze_implementation().

Here is the caller graph for this function: