So i've been looking into the Promises and Waiters, and i was wondering if there is a way to start a Transcription Job, while providing a callback, so it would tick (periodically check by itself) until the result of the Transcription would be COMPLETED
, and then use the callback to get the json with transcriptions and write the result to db.
So all i would have to do is start the job and provide the callback, and the waiter would periodically block the thread and check the status, allowing me to throw other requests in between, instead of doing all this with while
loops.
I tried the example provided here, but it just uses the wait()
method and blocks the thread anyway until it gets the result.
Is it even possible to do with the Transcribe service? A small code example of how to do it would be oh so much appreciated!