You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/anira-usage.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ There are also some optional parameters that can be set in the `anira::Inference
95
95
If your model does not require any specific pre- or post-processing, you can use the default `anira::PrePostProcessor`. This is likely to be the case if the input and output shapes of the model are the same, the batchsize is 1, and your model operates in the time domain.
If your model requires custom pre- or post-processing, you can inherit from the `anira::PrePostProcessor` class and overwrite the ```pre_process``` and ```post_process``` methods so that they match your model's requirements. In the ```pre_process``` method, we get the input samples from the audio application through an `anira::RingBuffer` and push them into the output buffer, which is an `anira::BufferF`. This output buffer is then used for inference. In the ```post_process``` method we get the input samples through an `anira::BufferF` and push them into the output buffer, which is an `anira::RingBuffer`. The samples from this output buffer are then returned to the audio application by the `anira::InferenceHandler`.
@@ -108,6 +108,8 @@ When your pre- and post-processing requires to access values from the `anira::In
108
108
109
109
class CustomPrePostProcessor : public anira::PrePostProcessor {
std::thread::hardware_concurrency() / 2 > 0 ? std::thread::hardware_concurrency() / 2 : 1 // Total number of threads
18
18
),
19
+
pp_processor(inference_config),
19
20
#if MODEL_TO_USE == 1 || MODEL_TO_USE == 2
20
21
// The bypass_processor is not needed for inference, but for the round trip test to output audio when selecting the CUSTOM backend. It must be customized when default pp_processor is replaced by a custom one.
0 commit comments