I have this pipeline that uses pocketsphinx's VAD element :
Gst.parse_launch( "pulsesrc device=\"alsa_input.usb-046d_08c9_674634A4-02-U0x46d0x8c9.analog-mono\" " + "! vader name=vad auto-threshold=true " + "! level name=wavelevel interval=100000000 " + // level interval is in nanoseconds "! wavenc " + "! filesink location=audioz.wav" );
It works fine except that the streaming stops when there is no voice comming in the source.
I want to recording to continue independently of the VAD, so I tried this pipeline with a tee :
Gst.parse_launch( "pulsesrc device=\"alsa_input.usb-046d_08c9_674634A4-02-U0x46d0x8c9.analog-mono\" " + "! tee name=t " + "! queue " + "! vader name=vad auto-threshold=true " + "! fakesink t. sync=false" + "! queue " + "! level name=wavelevel interval=100000000 " + // level interval is in nanoseconds "! wavenc " + "! filesink location=audioz.wav" );
And this one is always stalling, state going from NULL -> READY -> PAUSE, and stalling forever on PAUSE.
The goal of the "independent VAD" is simply to record the begining and end time of voice segments (detected by the VAD).
Update :
commenting the line : "! fakesink t. sync=false" solves the problem, so the following pipeline does what I need :
this.pipeline = Gst.parse_launch( "pulsesrc device=\"alsa_input.usb-046d_08c9_674634A4-02-U0x46d0x8c9.analog-mono\" " + " ! tee name=t" + " t. ! queue " + " ! vader name=vad auto-threshold=true " + " t. ! queue " + " ! level name=wavelevel interval=1000000000 " + // level interval is in nanoseconds " ! wavenc " + " ! filesink location=audioz.wav" );
The remaining question is if it's OK to have a queue without a sink...