sasubillis / voiceid

Automatically exported from code.google.com/p/voiceid
0 stars 0 forks source link

failing on v.extract_speakers #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Simple program to test...

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

db = GMMVoiceDB('db')

db.add_model('person1', 'John')

print db.get_speakers()

exit
v = Voiceid(db, 'test.wav')

v.extract_speakers()

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

gst-launch --version
gst-launch-0.10 version 0.10.29
GStreamer 0.10.29
http://download.fedora.redhat.com/fedora

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

Original issue reported on code.google.com by Todd.Fis...@calltrackingmetrics.com on 8 Nov 2013 at 9:15

GoogleCodeExporter commented 9 years ago
Looks like the error is related to the gst-launch command being incorrect?

creating a test shell script to execute:  

#!/bin/sh

gst-launch filesrc location='test.wav' '! decodebin ! audioresample ! 
'audio/x-raw-int,rate=1^C00' ! audioconvert ! 
'audio/x-raw-int,rate=16000,depth=16,signed=true,channels=1' !wavenc ! filesink 
location=test_.wav'

where test.wav is in the current working folder

./te.sh

WARNING: erroneous pipeline: no element "decodebin"

Original comment by Todd.Fis...@calltrackingmetrics.com on 8 Nov 2013 at 9:29

GoogleCodeExporter commented 9 years ago
Okay sorry this issue is fixed by installing more components to gstreamer

yum install gstreamer-devel gstreamer-plugins-bad-free gstreamer-plugins-base 
gstreamer-plugins-good

Original comment by Todd.Fis...@calltrackingmetrics.com on 8 Nov 2013 at 9:37

GoogleCodeExporter commented 9 years ago

Original comment by maurome...@gmail.com on 15 Feb 2014 at 4:21