When I run a program using PyGobject, I get a Namespace Gst not available
error. I found that you can fix this by doing sudo apt install python3-gst-1.0
, but I cannot find the correct/similar file for Manjaro/Arch. Any ideas would be great, I’m trying to use the playsound module which then calls gi (pyobject) but it has that error. This is all being run in a Jupyter Notebook with Anaconda to hold the modules.
Thank you
Code:
# TEST: Test shorter MFCC
!pip install playsound
from playsound import playsound
idx = 13
# Create path from given filename and target item
path = join(dataset_path, target_list[int(y_orig_train[idx])],
filenames_train[idx])
# Create MFCCs
mfccs = calc_mfcc(path)
print("MFCCs:", mfccs)
# Plot MFCC
fig = plt.figure()
plt.imshow(mfccs, cmap='inferno', origin='lower')
# TEST: Play problem sounds
print(target_list[int(y_orig_train[idx])])
playsound(path)
Error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-59-9cbeee90ea76> in <module>
19 # TEST: Play problem sounds
20 print(target_list[int(y_orig_train[idx])])
---> 21 playsound(path)
~/anaconda3/envs/tensorflow/lib/python3.8/site-packages/playsound.py in _playsoundNix(sound, block)
90
91 import gi
---> 92 gi.require_version('Gst', '1.0')
93 from gi.repository import Gst
94
~/anaconda3/envs/tensorflow/lib/python3.8/site-packages/gi/__init__.py in require_version(namespace, version)
124 available_versions = repository.enumerate_versions(namespace)
125 if not available_versions:
--> 126 raise ValueError('Namespace %s not available' % namespace)
127
128 if version not in available_versions:
ValueError: Namespace Gst not available