Ver Fonte

feat(inference): add GetNumStems method

沉默の金 há 4 meses atrás
pai
commit
1e634a7ccd
2 ficheiros alterados com 5 adições e 0 exclusões
  1. 1 0
      include/bs_roformer/inference.h
  2. 4 0
      src/inference.cpp

+ 1 - 0
include/bs_roformer/inference.h

@@ -34,6 +34,7 @@ public:
     int GetDefaultChunkSize() const;
     int GetDefaultNumOverlap() const;
     int GetSampleRate() const;
+    int GetNumStems() const;
 
     // Static helper for Overlap-Add logic (matches Python exactly)
     // model_func: input [samples], output [stems][samples] (interleaved stereo)

+ 4 - 0
src/inference.cpp

@@ -57,6 +57,10 @@ int Inference::GetSampleRate() const {
     return model_->GetSampleRate();
 }
 
+int Inference::GetNumStems() const {
+    return model_->GetNumStems();
+}
+
 Inference::~Inference() {
     if (allocr_) ggml_gallocr_free(allocr_);
     if (ctx_) ggml_free(ctx_);