voice_audio_multi/include/engine/models/fun_asr_nano/decoder.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
1.2 KiB
C++

#pragma once
#include "engine/framework/assets/tensor_source.h"
#include "engine/framework/core/execution_context.h"
#include "engine/models/fun_asr_nano/assets.h"
#include "engine/models/fun_asr_nano/types.h"
#include <cstddef>
#include <functional>
#include <memory>
namespace engine::models::fun_asr_nano {
using FunAsrNanoTokenCallback =
std::function<void(const FunAsrNanoGeneratedTokens &)>;
class FunAsrNanoQwen3DecoderRuntime {
public:
struct Impl;
FunAsrNanoQwen3DecoderRuntime(std::shared_ptr<const FunAsrNanoAssets> assets,
core::ExecutionContext &execution,
size_t prefill_graph_arena_bytes,
size_t decode_graph_arena_bytes,
size_t weight_context_bytes,
assets::TensorStorageType weight_storage_type);
~FunAsrNanoQwen3DecoderRuntime();
FunAsrNanoGeneratedTokens
generate(const FunAsrNanoPrompt &prompt,
const FunAsrNanoAdaptorEmbeddings &audio_embeddings,
const FunAsrNanoGenerationOptions &options,
const FunAsrNanoTokenCallback &token_callback = {});
private:
std::unique_ptr<Impl> impl_;
};
} // namespace engine::models::fun_asr_nano