Here I'm using the diart library for audio transcription and the OpenAI Whisper model model.
When I run my code I get this error though
Traceback (most recent call last):
File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site-
packages/torchaudio/_extension.py", line 71, in _init_ffmpeg
_load_lib("libtorchaudio_ffmpeg")
File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site-
packages/torchaudio/_extension.py", line 52, in _load_lib
torch.ops.load_library(path)
File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site-
packages/torch/_ops.py",
line 573, in load_library
ctypes.CDLL(path)
File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libavdevice.so.58: cannot open shared object file: No such file or directory
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/vkyc/Desktop/audio_streaming/LiveStream.py", line 13, in <module>
from diart.sources import MicrophoneAudioSource
File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site-
packages/diart/sources.py", line 11, in <module>
from torchaudio.io import StreamReader
File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site-
packages/torchaudio/io/__init__.py", line 21, in __getattr__
torchaudio._extension._init_ffmpeg()
File "/home/vkyc/Desktop/projectRasa/audio/lib/python3.10/site-
packages/torchaudio/_extension.py", line 73, in _init_ffmpeg
raise ImportError("FFmpeg libraries are not found. Please install FFmpeg.") from err
ImportError: FFmpeg libraries are not found. Please install FFmpeg.
I tried pip install python-ffmpeg
andsudo apt install ffmpeg
.
Although FFmpeg is installed on my system it still throws the same error.