voice_audio_multi/include/engine/community_models/whistle_asr/frontend.h
Fabio c36510c21e
Some checks failed
Linux Build / Linux cpu (push) Has been cancelled
Linux Build / Linux cpu-clang (push) Has been cancelled
Linux Build / Linux vulkan (push) Has been cancelled
mac-build / macOS CPU (push) Has been cancelled
Nix Build / Nix (cpu) (push) Has been cancelled
Nix Build / Nix (vulkan) (push) Has been cancelled
windows-build / Windows CPU (push) Has been cancelled
Initial import: audio.cpp with Orange Pi documentation
2026-11-04 19:05:22 +01:00

28 lines
757 B
C++

#pragma once
#include "engine/framework/audio/nemo_mel_frontend.h"
#include <cstddef>
#include <vector>
namespace engine::community_models::whistle_asr {
struct MelFeatures {
std::vector<float> values;
size_t frames = 0;
};
// Whistle log-mel features: the shared NemoMelFrontend STFT/mel/normalization
// path with Whistle's percentile gain normalization applied locally first.
class WhistleFrontend {
public:
explicit WhistleFrontend(std::vector<float> filterbank);
// The caller supplies mono 16 kHz float PCM, with at most 30 seconds per pass.
[[nodiscard]] MelFeatures extract(const std::vector<float> & samples) const;
private:
audio::NemoMelFrontend frontend_;
};
} // namespace engine::community_models::whistle_asr