intel / openvino-plugins-ai-audacity

A set of AI-enabled effects, generators, and analyzers for Audacity®.
GNU General Public License v3.0
1.04k stars 68 forks source link

Missing Directories and Lack of Permissions #242

Closed TechNerd-019 closed 4 months ago

TechNerd-019 commented 4 months ago

Hello. I have successfully built Audacity with the openVINO AI models as instructed for Linux users. My base system runs Fedora Workstation 40, so for this to work I had to make use of an Ubuntu container within distrobox. Although I am able to launch Audacity and the models are enabled, I am facing an error whenever I attempt to use them. Here is the complete log for what is displayed by Audacity:

01:24:24: Audacity 3.5.1-alpha-20240707
01:24:24: Error: Failed to load shared library 'libavformat.so.60' (error 0: Success)
01:24:24: Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)
01:24:24: FFmpeg libraries loaded successfully from: /lib/x86_64-linux-gnu/libavformat.so.58.76.100
01:24:25: Warning: Critical Nyquist files could not be found. Nyquist effects will not work.
01:24:26: Error: Failed to load shared library 'libavformat.so.60' (error 0: Success)
01:24:26: Error: Failed to load shared library 'libavformat.so.59' (error 0: Success)
01:24:26: FFmpeg libraries loaded successfully from: /lib/x86_64-linux-gnu/libavformat.so.58.76.100
01:24:31: File name is /home/technerd/Documents/Media/Audacity/Exports/Project - 3.wav
01:24:31: Mime type is *
01:24:31: Opening with libsndfile
01:24:31: Open(/home/technerd/Documents/Media/Audacity/Exports/Project - 3.wav) succeeded
01:24:31: Operation 'Importing WAV (Microsoft)' took 0.054000 seconds. Poll was called 14 times and took 0.000008 seconds. Yield was called 0 times and took 0.000000 seconds.
01:24:32: Operation 'Music Information Retrieval' took 0.000000 seconds. Poll was called 0 times and took 0.000000 seconds. Yield was called 0 times and took 0.000000 seconds.
01:24:40: Operation 'Pre-processing' took 0.000000 seconds. Poll was called 0 times and took 0.000000 seconds. Yield was called 0 times and took 0.000000 seconds.
01:24:40: Error: In Music Separation, exception: Exception from src/inference/src/cpp/core.cpp:123:
Exception from src/inference/src/model_reader.cpp:154:
Unable to read the model: /usr/local/lib/openvino-models/htdemucs_v4.xml Please check that model format: xml is supported and the model is correct. Available frontends: ir onnx paddle pytorch tf tflite 

01:24:43: Operation 'OpenVINO Music Separation' took 0.011000 seconds. Poll was called 2 times and took 0.000000 seconds. Yield was called 0 times and took 0.000000 seconds.

From what I am able to tell, a directory needed cannot be created since permissions are denied. I tried executing with sudo, by typing sudo Release/bin/audacity, but the results remain the same. I have attached an image of the error I face when attempting to run the effect:

Screenshot from 2024-07-08 01-26-11

If additional information is needed from my end, let me know, but I have not had luck with any of the models thus far.

Additional system information: System: Ubuntu 22.04 (Running through DistroBox) Host System: Fedora Workstation 40, GNOME 46.3.1 Kernel: 6.9.7-200.fc40.x86_64 CPU: Core i7-11800H Mobile CPU GPU: NVIDIA GeForce RTX 3070 Mobile / Max-Q

RyanMetcalfeInt8 commented 4 months ago

Hi @TechNerd-019,

From the log, it looks like it had trouble finding the required model files. In this case, /usr/local/lib/openvino-models/htdemucs_v4.xml.

Did you follow this step? https://github.com/intel/openvino-plugins-ai-audacity/blob/main/doc/build_doc/linux/README.md#openvino-models-installation

TechNerd-019 commented 4 months ago

My apologies for this, that was indeed the problem. Somehow, it slipped my mind and did not notice that section. Can confirm it works now with Audacity 3.5.1 and Ubuntu 22.04 using DistroBox, not sure if it would work on Fedora native since packages are not the same, but using it within a container works.

Thanks again. Also, just a small question, how do we know if newer releases of audacity will be compatible with the models? Is it trial and error? If we want to update the models, I assume we need to re-download all related files, rebuild audacity, and replace the openvino-models folder with newer content, correct? Or would it be enough to just extract new versions of the .xml and .bin files and delete the older ones?

Thanks again, feel free to close this issue after your reply.

Screenshot from 2024-07-08 14-20-28

RyanMetcalfeInt8 commented 4 months ago

Hi @TechNerd-019,

Glad you were able to get it working!

Also, just a small question, how do we know if newer releases of audacity will be compatible with the models? Is it trial and error?

It's a good question. The models are sort of separate from the code, and while it is possible that the models themselves may get updated -- they will definitely be changing less often than the module code.

If we want to update the models, I assume we need to re-download all related files, rebuild audacity, and replace the openvino-models folder with newer content, correct? Or would it be enough to just extract new versions of the .xml and .bin files and delete the older ones?

Well, technically you could simply download all of the new models and replace the .xml / .bin files with the new ones. It is possible that a model update may have been 'paired' with a change to the mod-openvino source code -- so in this case you would also need to update the source code and re-build.

It's not so straightforward, but the best place I can think of to understand if the models have changed is to take a look at a given tagged version of this file: https://github.com/intel/openvino-plugins-ai-audacity/blob/main/tools/windows/audacity_ai_plugins.iss#L220

This is what is used to generate the Windows installer, and will show the URL / commit-id's / hash of the model files that are used for that release.

Thanks, Ryan