I wanted to try how inference work when I run it in a process. My goal is to split a big file into chunks and then run inference for chunks in different processes. When I started testing it I mentioned that model inference hangs when running code in process. I modified client.py to reproduce issue. First I’m checking that model can run inference and then run code in process:
print(ds.stt(audio, fs)) print('Running inference.', file=sys.stderr) inference_start = timer() from multiprocessing import Process def func(model, audio, fs, res): res.append(model.stt(audio, fs)) res =  p = Process(target=func, args=(ds, audio, fs, res,)) p.start() p.join() print(res) inference_end = timer() - inference_start print('Inference took %0.3fs for %0.3fs audio file.' % (inference_end, audio_length), file=sys.stderr)
I’m using version 0.3.0. Would be great if you can explain this behavior.