voice_audio_multi/include/engine/community_models/reuse/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

25 lines
642 B
C++

#pragma once
#include "engine/framework/audio/dsp.h"
#include <cstddef>
#include <cstdint>
#include <vector>
namespace engine::models::reuse {
struct FrontendSpectrum {
audio::STFTConfig config;
audio::AudioTensor spectrum;
std::vector<float> features;
int64_t samples = 0;
int64_t frames = 0;
int64_t bins = 0;
int64_t hop = 0;
};
FrontendSpectrum analyze_spectrum(const std::vector<float> & waveform, int sample_rate, size_t threads);
std::vector<float> synthesize_spectrum(FrontendSpectrum & input,
const std::vector<std::vector<float>> & heads, size_t threads);
} // namespace engine::models::reuse