Hyfe Detection SDK Bindings
We are aware that working with C++ is sometimes less than ideal. That is why we have created a set of bindings that allow using our SDK in more developer friendly languages.
Currently we have bindings for: Python, Swift and Kotlin. The SDK can also be compiled using emscripten to generate a WASM output.
Python bindings
The python bindings must be compiled individually for each specific platform. They have been tested in Windows (x86), iOS (ARM and x86), Ubuntu (x86) and elinux (Raspberry Pie and similar).
The bindings can be imported into any python script like you would a normal library:
import HyfeDetectionSDK as SDK
help(SDK)
Running help() on the SDK explains it's methods:
Help on module HyfeDetectionSDK:
NAME
HyfeDetectionSDK - Hyfe's C++ detection SDK Python Bindings
FUNCTIONS
clean(...) method of builtins.PyCapsule instance
clean() -> int
Clean the sdk internal state to predict on a new audio source.
describe(...) method of builtins.PyCapsule instance
describe() -> None
Print sdk config.
detect(...) method of builtins.PyCapsule instance
detect(samples: List[float]) -> List[dict]
Process and run inference on the given audio samples.
Returns a list of cough predictions found (if any).
flush(...) method of builtins.PyCapsule instance
flush() -> List[dict]
Flush out and predict on any partially incomplete peaks (will be zero padded)
For an example of the SDK in action check out the Tutorial section.