| 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 | |
| 97 | void 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 |
no test coverage detected