Problem was with dependencies:
main python installation is python 3.8 but the dependencies have to be installed in python 3.6 as it is the version run by UiPath.
path_to_python36\python.exe -m pip install -U SpeechRecognition selenium pyaudio
and it was good.