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

Method run

src/framework/audio/deepfilternet2.cpp:851–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

849 }
850
851 DeepFilterNet2GraphOutput run(const Tensor4 & feat_erb, const Tensor4 & feat_spec) const {
852 ggml_backend_tensor_set(feat_erb_, feat_erb.v.data(), 0, feat_erb.v.size() * sizeof(float));
853 ggml_backend_tensor_set(feat_spec_, feat_spec.v.data(), 0, feat_spec.v.size() * sizeof(float));
854 const auto status = core::compute_backend_graph(backend_, graph_, plan_, "DeepFilterNet2 forward");
855 ggml_backend_synchronize(backend_);
856 if (status != GGML_STATUS_SUCCESS) {
857 throw std::runtime_error("DeepFilterNet2 forward graph compute failed");
858 }
859 return {
860 read_tensor(mask_, mask_shape_),
861 read_tensor(coefs_, coefs_shape_),
862 read_tensor(lsnr_, lsnr_shape_),
863 read_tensor(alpha_, alpha_shape_),
864 };
865 }
866
867private:
868 DeepFilterNet2Tensor read_tensor(ggml_tensor * tensor, const core::TensorShape & shape) const {

Callers 2

run_mono_48k_wholeFunction · 0.45
run_featuresMethod · 0.45

Calls 6

ggml_backend_tensor_setFunction · 0.85
compute_backend_graphFunction · 0.85
ggml_backend_synchronizeFunction · 0.85
read_tensorFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected