Felix
Felix

Reputation: 2154

Configuring pocketsphinx gstreamer element

I have pocketsphinx running as an element inside a python gstreamer pipeline, something along the lines of:

launch_config = 'gconfaudiosrc ! audioconvert ! audioresample ! vader name=vad auto-threshold=true ! pocketsphinx name=asr ! fakesink'
pipeline = gst.parse_launch(launch_config)

Using gst-inspect, I can see the pocketsphinx element has several properties (such as a language model file and dictionary file), but that these are separate from command-line options you might normally pass to the executable.

I would like to change the log file that pocketsphinx uses, but this is only an option to gst-pocketsphinx, not the pocketsphinx gstreamer element.

$ gst-inspect-0.10 pocketsphinx
INFO: cmd_ln.c(691): Parsing command line:

gst-pocketsphinx \
    -samprate 8000 \
    -cmn prior \
    -fwdflat no \
    -bestpath no \
    -maxhmmpf 2000 \
    -maxwpf 20 

Current configuration:
[NAME]      [DEFLT]     [VALUE]
<snip>
-logfn              

How can I pass the logfn argument to the pocketsphinx gstreamer element?

Upvotes: 1

Views: 348

Answers (1)

Nikolay Shmyrev
Nikolay Shmyrev

Reputation: 25210

I recommend you to use latest pocketsphinx 5prealpha, it supports gstreamer-1.0 and it uses gstreamer logging framework, so you can manage it as any other gstreamer element.

Upvotes: 2

Related Questions