<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div id="yiv1242648611"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; "><div id="yiv1242648611yui_3_2_0_16_133045835500148" style="font-size: 12pt; ">Thank you for the response Stefan! </div><div id="yiv1242648611yui_3_2_0_16_133045835500148" style="font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; " id="yiv1242648611yui_3_2_0_16_133045835500156" class="yiv1242648611yui_3_2_0_16_133045835500154"><div style="font-family: 'times new roman', 'new york', times, serif; " class="yiv1242648611yui_3_2_0_16_133045835500161" id="yiv1242648611yui_3_2_0_16_1330458355001313"><div id="yiv1242648611"><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; ">>>> What extactly
are you doing in the vader-start/stop signal handlers?
<br>
In the vader start callback I am not doing anything right now. </div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; ">In the vader stop callback I write the buffered result to a file. Like I said before I have a callback for the fakesink 'handoff' signal, where I append the result to my buffer. </div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; ">It looks something like this</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "><br></div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; ">def vader_start(self, arg, data):</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "> print "Vader start"</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "><br></div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; ">def
sink_new_buffer(self, pad, buffer, data):</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "> print "New Buffer!"</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "> self.sinkbuffer += buffer.data</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "><br></div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; ">def vader_stop(self, arg, data):</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "> print "Vader stop"</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "> FILE = open("out.flac", "wb")</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "> FILE.write(self.sinkbuffer)</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; ">
FILE.close()</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "> self.sinkbuffer = ""</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "><br></div><div id="yiv1242648611yui_3_2_0_16_1330458355001166" style="font-size: 12pt; "><br>>>> You might need to mark the first buffer of each new utterance with a
discont flag.</div><div id="yiv1242648611yui_3_2_0_16_1330458355001166"><font size="3">The vader plugin emits VADER_START and VADER_STOP signals. How do I mark it with a discount flag? Also will that flag make the AudioEncoderClass to reset the element? </font><br><br><br><font size="3">>>> Use a smaller buffersize on the capture size or write your own
chunking element. There is also a "removesilence" element and a
"cutter" element which you might want to check</font><br></div></div>I looked at flac encoder's implementation and it seems that I can achieve my goal if I can invoke the GStAudioEncoderClass->stop and GstAudioEncoderClass start methods. This will basically reset the state of the flacencoder element. </div><div style="font-family: 'times new roman', 'new york', times, serif; " class="yiv1242648611yui_3_2_0_16_133045835500161 yui_3_2_0_14_133045976945956" id="yiv1242648611yui_3_2_0_16_1330458355001313">These methods are invoked by AudioEncoder element's gst_audio_encoder_activate method. </div><div style="font-family: 'times new roman', 'new york', times, serif; " class="yiv1242648611yui_3_2_0_16_133045835500161 yui_3_2_0_14_133045976945956" id="yiv1242648611yui_3_2_0_16_1330458355001313">However it seems like this method is invoked only when the pipeline is first started. </div><div style="font-family: 'times new roman', 'new
york', times, serif; " class="yiv1242648611yui_3_2_0_16_133045835500161 yui_3_2_0_14_133045976945956" id="yiv1242648611yui_3_2_0_16_1330458355001313">Does anyone know if there is any other way I can trigger the method?</div><div style="font-family: 'times new roman', 'new york', times, serif; " class="yiv1242648611yui_3_2_0_16_133045835500161 yui_3_2_0_14_133045976945956" id="yiv1242648611yui_3_2_0_16_1330458355001313"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; " class="yiv1242648611yui_3_2_0_16_133045835500161 yui_3_2_0_14_133045976945956" id="yiv1242648611yui_3_2_0_16_1330458355001313">Thank you in advance,</div><div style="font-family: 'times new roman', 'new york', times, serif; " class="yiv1242648611yui_3_2_0_16_133045835500161 yui_3_2_0_14_133045976945956" id="yiv1242648611yui_3_2_0_16_1330458355001313">Alex. <br><br> </div> </div> </div></div></div></div></body></html>