kensho-technologies / pyctcdecode

A fast and lightweight python-based CTC beam search decoder for speech recognition.
Apache License 2.0
416 stars 89 forks source link

Add fork context to multiprocessing #51

Closed gkucsko closed 2 years ago

gkucsko commented 2 years ago

on mac with python 3.7+ the default context of multiprocessing changed from fork to spawn, see here: https://stackoverflow.com/questions/64095876/multiprocessing-fork-vs-spawn to allow access to class variables we need to enforce fork context

lopez86 commented 2 years ago

on mac with python 3.7+ the default context of multiprocessing changed from fork to spawn, see here: https://stackoverflow.com/questions/64095876/multiprocessing-fork-vs-spawn to allow access to class variables we need to enforce fork context

Is there some workaround for this to work with windows? It looks like the fork context isn't available on windows https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

gkucsko commented 2 years ago

great question... not sure. maybe just accept that batch predict doesn't work on windows? :/