Can't perform NL (Non-Linear) model training on 3.1.0

Voice related projects and technical discussions
AnkhInnovationsLLC
Member++
Posts: 16
Joined: Mon Dec 25, 2023 12:19 am

Can't perform NL (Non-Linear) model training on 3.1.0

Post by AnkhInnovationsLLC »

Hello,

Seems like something is wrong with NL model training using the tools provided for the XVF3800 while connected with the "Local Device" pathway as described in the user guide. This is a UA build at 16 kHz.

Code: Select all

kevin@Kevin-Parkers-MacBook-Pro mac_x86_64 % ./xvf_host nl_model_training /System/Volumes/Data/Users/kevin/Downloads/XVF3800-Software_v3_1_0/xvf3800_source_240205_204034/sources/xvf_tools.py
Command NL_MODEL_TRAINING does not exist.
Maybe you meant BLD_MODIFIED.
Was it the command renamed? Because there isn't any such mention in the source for the device itself

Code: Select all

kevin@Kevin-Parkers-MacBook-Pro sources % grep -iR "NL_MODEL_TRAINING" ./
.//app_xvf3800/nl_model_gen/remote_nl_model_training.py:Usage: python3 remote_nl_model_training.py <Remote RPi IP address> <Path to the host app binaries>
.//app_xvf3800/nl_model_gen/remote_nl_model_training.py:eg. python3 remote_nl_model_training.py 192.168.68.59 ~/Downloads/xvf3800_bin_external_230222_190451/host_v0.2.0/rpi/
.//app_xvf3800/nl_model_gen/nl_model_training.py:Usage: python3 nl_model_training.py <host_app_bin> <--protocol [i2c|spi|usb]>
.//app_xvf3800/nl_model_gen/nl_model_training.py:Example, python3 nl_model_training.py Downloads/archive/xvf3800_bin_external_230530_131747/host_v1.0.0/rpi/xvf_host -p i2c
.//xvf_tools.py:    "nl_model_training":        NL_MODEL_GEN_SCRIPTS_DIR + "nl_model_training.py",
.//xvf_tools.py:    "remote_nl_model_training": NL_MODEL_GEN_SCRIPTS_DIR + "remote_nl_model_training.py",
Is this an Raspberry Pi only tool or should local devices be supported?

Regards,
User avatar
upav
Verified
New User
Posts: 3
Joined: Wed May 22, 2024 3:30 pm

Post by upav »

Hey there,

I think you've got the python and xvf_host binary the other way around. xvf_tools.py needs a path to xvf_host as the script uses it inside. So you'll need to do:

Code: Select all

python3 xvf_tools.py nl_model_training <host_app> [--protocol {i2c,spi,usb}]
You can find more info in the 3800 docs https://www.xmos.com/documentation/XM-0 ... near-model

Pavel,
xmos software engineer
AnkhInnovationsLLC
Member++
Posts: 16
Joined: Mon Dec 25, 2023 12:19 am

Post by AnkhInnovationsLLC »

Yep that was it... Thank you @upav

Code: Select all

kevin@Kevin-Parkers-MacBook-Pro mac_x86_64 % python3 /System/Volumes/Data/Users/kevin/Downloads/XVF3800-Software_v3_1_0/xvf3800_source_240205_204034/sources/xvf_tools.py nl_model_training /Users/kevin/Downloads/XVF3800-Binary_v3_1_0/host_v2.1.0/mac_x86_64/xvf_host

Running NL model tuning script
Running FW version v3.1.0

Playing audio file /System/Volumes/Data/Users/kevin/Downloads/XVF3800-Software_v3_1_0/xvf3800_source_240205_204034/sources/app_xvf3800/nl_model_gen/audio_files/nlaec0_16k_stereo.wav

Input File     : 'default' (coreaudio)
Channels       : 1
Sample Rate    : 44100
Precision      : 32-bit
Sample Encoding: 32-bit Signed Integer PCM

In:0.00% 00:01:30.74 [00:00:00.00] Out:4.00M [      |      ]        Clip:0    Playing audio file /System/Volumes/Data/Users/kevin/Downloads/XVF3800-Software_v3_1_0/xvf3800_source_240205_204034/sources/app_xvf3800/nl_model_gen/audio_files/nlaec12_16k_stereo.wav

Input File     : 'default' (coreaudio)
Channels       : 1
Sample Rate    : 44100
Precision      : 32-bit
Sample Encoding: 32-bit Signed Integer PCM

In:0.00% 00:01:30.23 [00:00:00.00] Out:3.98M [      |      ]        Clip:0    Playing audio file /System/Volumes/Data/Users/kevin/Downloads/XVF3800-Software_v3_1_0/xvf3800_source_240205_204034/sources/app_xvf3800/nl_model_gen/audio_files/nlaec12_16k_stereo.wav

Input File     : 'default' (coreaudio)
Channels       : 1
Sample Rate    : 44100
Precision      : 32-bit
Sample Encoding: 32-bit Signed Integer PCM

In:0.00% 00:01:30.74 [00:00:00.00] Out:4.00M [      |      ]        Clip:30   
NL model saved in output directory src.autogen
Output NL model binary file = src.autogen/nlmodel_buffer_override.bin.r16.c40
Saving src.autogen/nlmodel_buffer_override.bin.r16.c40_plot.png
kevin@Kevin-Parkers-MacBook-Pro mac_x86_64 % open src.autogen/nlmodel_buffer_override.bin.r16.c40_plot.png