I can't find lib_audio_dsp repository!

Discussions relating to the XK-EVK-XU316
danielp
Active Member
Posts: 33
Joined: Tue Jul 16, 2024 9:52 am
Location: Bristol, UK

Post by danielp »

alwalker wrote: Thu Jan 16, 2025 7:25 am xcommon cmake probably defaults to SSH so you might need to do this anyway
I just want to clarify that while XCommon CMake defaults to SSH access when fetching dependencies, if you don't have your SSH key set up with GitHub, it will fallback to using HTTPS - in fact, you can fetch the required software using XCommon CMake without having a GitHub account!
XMOS, Senior Software Engineer
User avatar
xhuw
Verified
Active Member
Posts: 41
Joined: Wed May 22, 2024 2:36 pm

Post by xhuw »

The app note links which were dead before are now live. AN02014 and AN02015 show a basic example of using lib_audio_dsp with the multi-channel audio board
XMOS Software Engineer

Image
alwalker
Experienced Member
Posts: 71
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi xhuw and danielp,

Thanks very much, after sorting out the GitHub public key issue I have completed the installation process including the creation of the Python virtual environment. One minor point, I had to type the following on the XTC Tools command prompt in Windows 11:

py -m venv .venv

In the lib_audio_dsp documentation, the hardware requirements state an xcore.ai evaluation board (XK-EVK-XU316 or XK-316-AUDIO-MC-AB), however when I worked through the instructions to the point of connecting the hardware, it states to connect an XCORE-AI-EXPLORER using both USB ports. Does it matter which board I use please? I only have XK-316-AUDIO-MC-AB.

When I launch Jupyter Notebook and select Run All Cells I get the following error:
250117_Jupyter_Notebook_Error.png
You do not have the required permissions to view the files attached to this post.
User avatar
xhuw
Verified
Active Member
Posts: 41
Joined: Wed May 22, 2024 2:36 pm

Post by xhuw »

Hey, I just reviewed the guide you have been following. It's missing a step: installing the audio_dsp Python package. Assuming you are in the "lib_audio_dsp" directory, and you have activated your virtual environment, then you can run:

Code: Select all

cd python
pip install -e .
You may have a bit more luck following AN02014 https://www.xmos.com/file/an02014-integ ... nce-design as this example shows audio_dsp integrated into a USB audio device. once you get that set up you will be able to play audio through it and add DSP as required.
XMOS Software Engineer

Image
alwalker
Experienced Member
Posts: 71
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi xhuw,

Thanks, but the instructions you specify don't work in my Windows XTC environment, what am I missing please?
250121_pip_install_error.png
You do not have the required permissions to view the files attached to this post.
User avatar
xhuw
Verified
Active Member
Posts: 41
Joined: Wed May 22, 2024 2:36 pm

Post by xhuw »

Hey Al, In the screenshot you do not activate the virtual environment after creating it.

Code: Select all

py -m venv .venv              # create a venv
.venv\Scripts\activate        # activate the venv
After activating the venv, pip will be available.

You will then install the Python dependencies into this virtual environment. The virtual environment needs to be reactivated every time you restart cmd.exe. Activating the virtual environment just sets some environment variables, which means it is only active in the cmd.exe that you activated it in.

With the virtual environment active, you should be able to launch the notebook and have the required python modules available.
XMOS Software Engineer

Image
alwalker
Experienced Member
Posts: 71
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

Hi xhuw,

I'm documenting my experience for the benefit of other users. I found I needed to have Visual Studio installed first.
250122 Visual Studio Error.png
You do not have the required permissions to view the files attached to this post.
Last edited by alwalker on Wed Jan 22, 2025 8:07 am, edited 2 times in total.
alwalker
Experienced Member
Posts: 71
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

I installed Visual Studio 2022 Community Edition, so the specified file exists at C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe but then it complained that it couldn't find the various C/C++/Clang compilers.
250122 Visual Studio Error 2.png
You do not have the required permissions to view the files attached to this post.
alwalker
Experienced Member
Posts: 71
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

After adding the necessary compilers the pip install -e . process ran to completion. However I still get the same error in Jupyter Notebook:
250122_Jupyter_Launch_Sequence.png
250122 Jupyter Notebook Error.png
You do not have the required permissions to view the files attached to this post.
alwalker
Experienced Member
Posts: 71
Joined: Sun Apr 08, 2018 11:19 pm

Post by alwalker »

As there are clearly significant omissions from the installation instructions in the lib_audio_dsp documentation, can I request that it be revised and republished as a priority please, with all steps necessary fully described?