MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / load_hift_conv1d

Function load_hift_conv1d

src/models/chatterbox/hift_vocoder_impl.cpp:82–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 int64_t frames,
81 uint64_t seed,
82 uint64_t prior_noise_values,
83 const std::vector<float> & cache_source) const {
84 if (batch != 1) {
85 throw std::runtime_error("Chatterbox HiFT expects batch 1");
86 }
87 if (!cache_source.empty()) {
88 throw std::runtime_error("Chatterbox HiFT does not support cache_source");
89 }
90 const auto result = state_->component.synthesize(speech_feat, frames, seed, prior_noise_values);
91 HiFTVocoderOutputs outputs;
92 outputs.waveform = result.waveform;
93 outputs.samples = result.samples;
94 return outputs;
95}
96
97void HiFTVocoderComponent::release_runtime_cache() const {
98 if (state_ == nullptr) {
99 throw std::runtime_error("Chatterbox HiFT is not initialized");
100 }
101 state_->component.release_runtime_cache();
102}
103
104} // namespace engine::models::chatterbox

Callers 1

Calls 3

make_from_f32Method · 0.80
read_f32_tensorFunction · 0.70
make_f32Method · 0.45

Tested by

no test coverage detected