| 44 | : execution_context_(&execution_context), |
| 45 | state_(std::move(state)) {} |
| 46 | |
| 47 | const engine::core::BackendConfig & CAMPPlusEncoderComponent::backend() const noexcept { |
| 48 | return execution_context_->config(); |
| 49 | } |
| 50 | |
| 51 | SpeakerEncoderOutputs CAMPPlusEncoderComponent::embed_from_audio(const runtime::AudioBuffer & audio) const { |
| 52 | const auto fbank = components::compute_campplus_fbank(audio); |
| 53 | return embed_from_features(fbank.features, fbank.frames, fbank.dims); |
| 54 | } |
| 55 | |
| 56 | SpeakerEncoderOutputs CAMPPlusEncoderComponent::embed_from_features( |
| 57 | const std::vector<float> & features, |
| 58 | int64_t frames, |
| 59 | int64_t dims) const { |
| 60 | return to_chatterbox_outputs(state_->component.embed_from_features(features, frames, dims)); |
| 61 | } |
| 62 | |
| 63 | } // namespace engine::models::chatterbox |
no test coverage detected