Massive delay using Python interface

We want to present acoustic stimuli using the Steinberg UR22mkII. An interface in Python, we rely on the sounddevice module ( Unfortunately, so far, we did not manage to present our sounds in WASAPI exclusive mode. We are facing a massive delay. A detailed description of the problem is posted on Github:

Any help is highly appreciated.