xmos / fwk_voice

Voice Framework
Other
11 stars 19 forks source link

Change VNR inference code to be aligned with the single model per VNR object design #311

Closed shuchitak closed 2 years ago

shuchitak commented 2 years ago

In the current VNR inference library, there's support for only one model per VNR object. The code however looks confusing since there's some persistent memory allocated as static global within the VNR inference file and there's some persistent memory that the user allocates as part of vnr_ie_state_t structure and provides to VNR inference as part of vnr_inference_init() call.

I plan to make changes such that all VNR inference persistent memory is allocated as static global within the vnr_inference.cc file. This will make it obvious to the user that the model and all it's memory is allocated within the VNR and reconfiguring for another model at runtime is not supported.

I'll also change VNR inference library from static to interface library as part of this issue since the VNR inference library compilation is dependant on the HW target being compiled for and so doesn't make sense for it to be a static library.

I'll redesign the VNR inference to support more than 1 model as a separate feature and will be done once lib_tflite_micro refactoring, that is currently in progress and might mean significant changes to the way it is included in VNR inference, is done (https://xmosjira.atlassian.net/browse/XT-206).

shuchitak commented 2 years ago

Merged https://github.com/xmos/sw_avona/pull/313