voice_audio_multi/include/engine/community_models/sanotts/piper_runtime.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

34 lines
859 B
C++

#pragma once
#include "engine/community_models/sanotts/assets.h"
#include "engine/framework/runtime/session.h"
#include <cstdint>
#include <memory>
#include <vector>
namespace engine::models::sanotts {
struct SanoTtsPiperGenerationOptions {
/** Multiplier on the voice's tuned duration_length_scale; larger is
* slower. The decoder is deterministic -- there is no seed. */
float speaking_rate = 1.0F;
};
class SanoTtsPiperRuntime {
public:
SanoTtsPiperRuntime(
std::shared_ptr<const SanoTtsAssets> assets,
core::BackendConfig backend_config);
~SanoTtsPiperRuntime();
runtime::AudioBuffer synthesize(
const std::vector<int32_t> & token_ids,
const SanoTtsPiperGenerationOptions & options);
private:
struct State;
std::unique_ptr<State> state_;
};
} // namespace engine::models::sanotts