voice_audio_multi/include/engine/models/universr/assets.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

39 lines
944 B
C++

#pragma once
#include "engine/framework/assets/resource_bundle.h"
#include "engine/framework/assets/tensor_source.h"
#include <filesystem>
#include <map>
#include <memory>
#include <vector>
namespace engine::models::universr {
struct UniverSRConfig {
std::vector<int64_t> dims;
std::vector<int64_t> depths;
int time_dim = 0;
int cond_dim = 0;
int total_freq_bins = 0;
int hr_freq_bins = 0;
int feature_enc_layers = 0;
std::map<int, int> sr_to_lr_bins;
int sample_rate = 0;
int n_fft = 0;
int hop_length = 0;
float alpha = 0;
float beta = 0;
float comp_eps = 0;
};
struct UniverSRAssets {
assets::ResourceBundle resources;
std::shared_ptr<const assets::TensorSource> tensors;
UniverSRConfig config;
std::vector<float> window;
};
std::shared_ptr<const UniverSRAssets> load_universr_assets(const std::filesystem::path & path);
} // namespace engine::models::universr