Skip to content

Commit

Permalink
fix linux: #46
Browse files Browse the repository at this point in the history
  • Loading branch information
abdeladim-s committed Aug 29, 2024
1 parent ce3923c commit 7bf3243
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pywhispercpp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
lib_dir = os.path.join(os.path.dirname(__file__), 'lib/*')

# Append lib dir to PATH
os.add_dll_directory(os.path.join(os.path.dirname(__file__), 'lib'))
if os.name == 'nt':
os.add_dll_directory(os.path.join(os.path.dirname(__file__), 'lib'))

for file in glob(lib_dir):
ctypes.CDLL(os.path.join(os.path.dirname(__file__), 'lib', file))

0 comments on commit 7bf3243

Please sign in to comment.