alumae / gst-kaldi-nnet2-online

GStreamer plugin around Kaldi's online neural network decoder
Apache License 2.0
185 stars 100 forks source link

how to record the audio into ogg/wav file at the same time? #93

Open kzintun opened 4 years ago

kzintun commented 4 years ago

I am trying to record audio while running recognition from kaldi asr. I have tried the following pipeline in gstreamer (modified from gui-demo.py):

    # get audio from mic device
    self.pulsesrc.link(self.audioconvert)
    self.audioconvert.link(self.tee)

    # save to ogg
    self.audio_queue.link(self.vorbisenc)
    self.vorbisenc.link(self.oggmux)
    self.oggmux.link(self.filesink)

    # send to asr
    self.asr_queue.link(self.audioresample)
    self.audioresample.link(self.asr)
    self.asr.link(self.fakesink)

    # tied up tee and queues
    self.tee.link(self.audio_queue)
    self.tee.link(self.asr_queue)

But it's not working. No error message but getting 0 kb file and no output from ASR. Any help?