OSError:子进程<子流程.Popen0x7fb398d26610>处的对象意外关闭[java Xmx2048m jar/LIUM\u spkdiariation4.7.j]

2024-06-26 14:17:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在ubuntu16.04上使用voiceid实现“说话人日记”。当我尝试使用db.add\模型(). VoiceID的wiki文档说,即使没有添加任何模型,它仍然会给出带有未知标识符的输出。我试着实现它,但又出现了类似的错误。你知道吗

代码如下:

from voiceid.sr import Voiceid
from voiceid.db import GMMVoiceDB

db = GMMVoiceDB('db_voice')

db.add_model('speaker1','speaker_one')

v = Voiceid(db,'convo1.mp3')

v.extract_speakers()

for c in v.get_clusters():
    cluster = v.get_cluster(c)
    print cluster
    cluster.print_segments()

我在add\u model()步骤中得到的错误如下:

Traceback (most recent call last):
File "voiceid1.py", line 6, in 
db.add_model('speaker1','speaker_one')
File "/usr/local/lib/python2.7/dist-packages/voiceid/db.py", line 187, in add_model
fm.build_gmm(basefilename, identifier)
File "/usr/local/lib/python2.7/dist-packages/voiceid/fm.py", line 315, in build_gmm
diarization_standard(filebasename)
File "/usr/local/lib/python2.7/dist-packages/voiceid/fm.py", line 524, in diarization_standard
+ filebasename)
File "/usr/local/lib/python2.7/dist-packages/voiceid/utils.py", line 79, in start_subprocess
raise err
OSError: Subprocess <subprocess.Popen object at 0x7f9564d80710> closed unexpectedly [java -Xmx2048m -jar /usr/local/share/voiceid/LIUM_SpkDiarization-4.7.jar fr.lium.spkDiarization.system.Diarization --fInputMask=%s.wav --sOutputMask=%s.seg --doCEClustering /home/vikas/python_codes/diarize/speaker1]

获取v.extract\u speakers()步骤时出错如下:

converting_file
Traceback (most recent call last):
File "voiceid1.py", line 10, in 
v.extract_speakers()
File "/usr/local/lib/python2.7/dist-packages/voiceid/sr.py", line 988, in extract_speakers
self._to_wav()
File "/usr/local/lib/python2.7/dist-packages/voiceid/sr.py", line 697, in _to_wav
fname = fm.file2wav(self.get_filename())
File "/usr/local/lib/python2.7/dist-packages/voiceid/fm.py", line 84, in file2wav
+ "wavenc ! filesink location=" + name + ".wav ")
File "/usr/local/lib/python2.7/dist-packages/voiceid/utils.py", line 79, in start_subprocess
raise err
OSError: Subprocess <subprocess.Popen object at 0x7f85f32e17d0> closed unexpectedly [gst-launch filesrc location='convo1.mp3' ! decodebin ! audioresample ! 'audio/x-raw-int,rate=16000' ! audioconvert ! 'audio/x-raw-int,rate=16000,depth=16,signed=true,channels=1' !wavenc ! filesink location=convo1.wav ]

我使用java版本“1.8.0\u101”。Python 2.7.12版。你知道吗

我甚至在终端上用Python运行了jar文件,得到的结果如下:

info[info] ======================================================
info[program] name = Diarization
info[info] ------------------------------------------------------
info[show] [options] show
info[ParameterFeature-Input] --fInputMask Features input mask = %s.mfcc
info[ParameterFeature-Input] --fInputDesc Features info (type[,s:e:ds:de:dds:dde,dim,c:r:wSize:method]) = audio2sphinx,1:1:0:0:0:0,13,0:0:0:0
info[ParameterFeature-Input] type [sphinx,spro4,htk,gztxt,audio2sphinx] = audio2sphinx (4)
info[ParameterFeature-Input] static [0=not present,1=present ,3=to be removed] = 1
info[ParameterFeature-Input] energy [0,1,3] = 1
info[ParameterFeature-Input] delta [0,1,2=computed on the fly,3] = 0
info[ParameterFeature-Input] delta energy [0,1,2=computed on the fly,3] = 0
info[ParameterFeature-Input] delta delta [0,1,2,3] = 0
info[ParameterFeature-Input] delta delta energy [0,1,2,3] = 0
info[ParameterFeature-Input] file dim = 13
info[ParameterFeature-Input] normalization, center [0,1] = 0
info[ParameterFeature-Input] normalization, reduce [0,1] = 0
info[ParameterFeature-Input] normalization, window size = 0
info[ParameterFeature-Input] normalization, method [0 (segment), 1 (cluster), 2 (sliding), 3 (warping)] =0
info[ParameterFeature-Input] --fInputMemoryOccupationRate memory occupation rate of the feature in the java virtual machine = 0.8
info[info] ------------------------------------------------------
info[ParameterSegmentationFile-Input] --sInputMask segmentation mask =
info[ParameterSegmentationFile-Input ([seg,bck,ctl,saus.seg,seg.xml,media.xml],[ISO-8859-1,UTF8])] --sInputFormat segmentation format = seg,ISO-8859-1
info[ParameterSegmentationFile-Input2] --sInput2Mask segmentation mask =
info[ParameterSegmentationFile-Input2 ([seg,bck,ctl,saus.seg,seg.xml,media.xml],[ISO-8859-1,UTF8])] --sInput2Format segmentation format = seg,ISO-8859-1
info[ParameterSegmentationFile-Output] --sOutputMask segmentation mask = %s.out.seg
info[ParameterSegmentationFile-Output ([seg,bck,ctl,saus.seg,seg.xml,media.xml],[ISO-8859-1,UTF8])] --sOutputFormat segmentation format = seg,ISO-8859-1
info[info] ------------------------------------------------------
info[ParameterSystem] --system [baseline,10s]= baseline
info[ParameterSystem] --doCEClustering = false
info[ParameterSystem] --doTuning = false
info[ParameterSystem] --thresholds = l=2.0, h=3.0, d=250.0, c=1.7:5.0
info[ParameterSystem] --saveAllStep = false
info[ParameterSystem] --loadInputSegmentation = false
info[info] ------------------------------------------------------

提前谢谢你的帮助。你知道吗


Tags: inpyinfoinputdblibpackagesusr