Method blocking GUI. Is it possible to do asynchronously somehow?

Hi guys,
I’m using a text-to-speech libray in my code.
The problem is “speak” method is blocking the GUI.
Is it possible to call it asynchronously somehow? I tried using webworkes with no sucess (It’s confusing to me)
Another solution is to use ionicLoading during processing but it not showing also.

This is the code that freezes for 5 seconds or so:
What do you guys recommend in this situation?

$scope.speak = function () {
content: ‘’,
animation: ‘fade-in’,
showBackdrop: true,
maxWidth: 200,
showDelay: 0
meSpeak.speak(“Hello… Testing…”, {
amplitude: “180”,
wordgap: “0”,
pitch: “84”,
speed: “100”,
variant: “whisper”

What library are you using, we can’t help you without a lot more information.

I think he is using:

Yes, that’s the library.