Support not using external buffers for node-addon (#925)

This commit is contained in:
Fangjun Kuang
2024-05-28 11:50:23 +08:00
committed by GitHub
parent cd65e7627d
commit b1c7d04ce2
11 changed files with 226 additions and 80 deletions

View File

@@ -18,9 +18,9 @@ class SpeakerEmbeddingExtractor {
}
// return a float32 array
compute(stream) {
compute(stream, enableExternalBuffer = true) {
return addon.speakerEmbeddingExtractorComputeEmbedding(
this.handle, stream.handle);
this.handle, stream.handle, enableExternalBuffer);
}
}