diff --git a/hooks/hook-webrtcvad.py b/hooks/hook-webrtcvad.py new file mode 100644 index 0000000..729bde6 --- /dev/null +++ b/hooks/hook-webrtcvad.py @@ -0,0 +1,25 @@ +""" +PyInstaller hook for webrtcvad. + +The webrtcvad-wheels package provides webrtcvad module but uses a different +package name, causing PyInstaller's default hook to fail. This custom hook +handles the metadata correctly. +""" + +from PyInstaller.utils.hooks import copy_metadata + +# Try to copy metadata from webrtcvad-wheels (the actual package name) +# Fall back gracefully if not found +try: + datas = copy_metadata('webrtcvad-wheels') +except Exception: + # If webrtcvad-wheels metadata not found, try webrtcvad + try: + datas = copy_metadata('webrtcvad') + except Exception: + # If neither found, that's okay - the module will still work + datas = [] + +# Ensure webrtcvad binary extensions are included +hiddenimports = [] +binaries = []