voice_audio_multi/include/engine/models/dots_tts/audio_features.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

36 lines
926 B
C++

#pragma once
#include "engine/framework/runtime/session.h"
#include <cstdint>
#include <optional>
#include <vector>
namespace engine::models::dots_tts {
struct DotsFbankOutput {
std::vector<float> values;
int64_t frames = 0;
int64_t dims = 0;
};
struct DotsPreparedReferenceAudio {
std::vector<float> waveform_16k;
std::vector<float> waveform_vocoder_rate;
DotsFbankOutput speaker_fbank;
};
DotsPreparedReferenceAudio prepare_dots_reference_audio(
const runtime::AudioBuffer & audio,
int vocoder_sample_rate,
int64_t samples_per_patch,
std::optional<float> max_duration_seconds = std::nullopt);
std::vector<float> prepare_dots_edit_source_audio(
const runtime::AudioBuffer & audio,
int vocoder_sample_rate,
int64_t samples_per_patch);
DotsFbankOutput compute_dots_speaker_fbank_16k(const std::vector<float> & waveform_16k);
} // namespace engine::models::dots_tts