[Feature] Support async jobs and later retrieval
The current ASR framework is cool, however there becomes a bigger issue when any audio larger than a seconds in loaded. When upload files in excess of 50MB, the service starts to fail, where requests commonly exceed 30 seconds and can prompt gateway timeouts, etc when deployed on Kubernetes services.
I propose a batch processor, where a submission can be made and a ticket or id is provided so a user can retrieve the results later.
A small database can be used, such as sqlite, and then data can be automatically deleted x amount of time after it's first retrieval.
Something along the lines of:
POST /submit_job -> uploads and queues/batches
GET /retrieve -> returns the results if ready other a not ready code
This would harden the application and make it more robust.
I settled on an async processor. It uses the same:
POST asr/ and takes an additional parameter async_job
and now has a new GET asr/{job_id}