r4victor / afaligner

📈 A forced aligner intended for synchronization of narrated text
MIT License
81 stars 11 forks source link

OSError dtwbd.so during align #5

Closed Sfonxs closed 2 years ago

Sfonxs commented 2 years ago

I created the docker image and ran the container with Docker For Windows. But I'm getting the following error when using the align method:

root@b5e71be4d210:/cdisk# python script.py
ffmpeg version 4.3.3-0+deb11u1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'audio/in_the_end_vocals.wav':
  Metadata:
    encoder         : Lavf58.20.100
  Duration: 00:03:38.27, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'output/tmp/in_the_end_vocals_audio.wav':
  Metadata:
    ISFT            : Lavf58.45.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc58.91.100 pcm_s16le
size=   37600kB time=00:03:38.26 bitrate=1411.2kbits/s speed= 318x
video:0kB audio:37600kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000203%
Traceback (most recent call last):
  File "/cdisk/script.py", line 3, in <module>
    sync_map = align(
  File "/usr/local/lib/python3.9/site-packages/afaligner/__init__.py", line 90, in align
    sync_map = build_sync_map(
  File "/usr/local/lib/python3.9/site-packages/afaligner/__init__.py", line 207, in build_sync_map
    _, path = c_FastDTWBD(text_mfcc_sequence, audio_mfcc_sequence, skip_penalty, radius=radius)
  File "/usr/local/lib/python3.9/site-packages/afaligner/c_dtwbd_wrapper.py", line 18, in c_FastDTWBD
    c_module = ctypes.cdll[os.path.join(BASE_DIR, 'c_modules/dtwbd.so')]
  File "/usr/local/lib/python3.9/ctypes/__init__.py", line 449, in __getitem__
    return getattr(self, name)
  File "/usr/local/lib/python3.9/ctypes/__init__.py", line 444, in __getattr__
    dll = self._dlltype(name)
  File "/usr/local/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/python3.9/site-packages/afaligner/c_modules/dtwbd.so: cannot open shared object file: No such file or directory
xanderberkein commented 2 years ago

Running into the same issue on Docker for Mac

spiccrix commented 2 years ago

Same problem here

r4victor commented 2 years ago

FIxed.