I am trying to port this
example "Using PocketSphinx with GStreamer and Python" to Vala. I have an
example compiling but I am getting some warnings that I don't understand and a
segmentation fault when running. Also, I am not sure what data types I should
be using for the "text" and "uttid" params in the asrResult ,
asrPartialResult, partialResult and finalResult methods.
My environment is Fedora 16. PocketSphinx .7, latest gstreamer that comes with
Fedora 16. I am using Clutter for the main loop because my application UI will
ultimately be written in Clutter. Any help would be greatly appreciated. Here
are my compile warnings and code .... thanks.
$ valac -X -O2 -g --pkg clutter-1.0 --pkg gstreamer-0.10 --pkg gstreamer-
interfaces-0.10 --pkg clutter-gst-1.0 cmu.vala
cmu.vala:25.24-25.48: warning: unhandled error GLib.Error'
pipeline = (Pipeline)Gst.parse_launch(pipeDef);
^^^^^^^^^^^^^^^^^^^^^^^^^
cmu.vala:11.2-11.26: warning: fieldSphinx.vader' never used
private Gst.Element vader;
^^^^^^^^^^^^^^^^^^^^^^^^^
cmu.vala:112.6-112.26: warning: local variable `sphinx' declared but never
used
var sphinx = new Sphinx();
^^^^^^^^^^^^^^^^^^^^^
/home/brian/BitBucketRepos/foodie/cmu.vala: In function
‘sphinx_asrPartialResult’:
/home/brian/BitBucketRepos/foodie/cmu.vala:51:2: warning: passing argument 1
of ‘gst_structure_set_value’ discards ‘const’ qualifier from pointer target
type
/usr/include/gstreamer-0.10/gst/gststructure.h:117:25: note: expected ‘struct
GstStructure ’ but argument is of type ‘const struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala:52:2: warning: passing argument 1
of ‘gst_structure_set_value’ discards ‘const’ qualifier from pointer target
type
/usr/include/gstreamer-0.10/gst/gststructure.h:117:25: note: expected ‘struct
GstStructure ’ but argument is of type ‘const struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala:54:2: warning: passing argument 1
of ‘_gst_structure_copy0’ discards ‘const’ qualifier from pointer target type
cmu.vala.c:287:17: note: expected ‘gpointer’ but argument is of type ‘const
struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala: In function ‘sphinx_asrResult’:
/home/brian/BitBucketRepos/foodie/cmu.vala:65:2: warning: passing argument 1
of ‘gst_structure_set_value’ discards ‘const’ qualifier from pointer target
type
/usr/include/gstreamer-0.10/gst/gststructure.h:117:25: note: expected ‘struct
GstStructure ’ but argument is of type ‘const struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala:66:2: warning: passing argument 1
of ‘gst_structure_set_value’ discards ‘const’ qualifier from pointer target
type
/usr/include/gstreamer-0.10/gst/gststructure.h:117:25: note: expected ‘struct
GstStructure ’ but argument is of type ‘const struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala:68:2: warning: passing argument 1
of ‘_gst_structure_copy0’ discards ‘const’ qualifier from pointer target type
cmu.vala.c:287:17: note: expected ‘gpointer’ but argument is of type ‘const
struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala: In function ‘sphinx_app_message’:
/home/brian/BitBucketRepos/foodie/cmu.vala:77:2: warning: passing argument 1
of ‘_gst_structure_copy0’ discards ‘const’ qualifier from pointer target type
cmu.vala.c:287:17: note: expected ‘gpointer’ but argument is of type ‘const
struct GstStructure *’
cmu.vala.c: In function ‘_vala_main’:
/home/brian/BitBucketRepos/foodie/cmu.vala:107:15: warning: ignoring return
value of ‘clutter_init’, declared with attribute warn_unused_result
Compilation succeeded - 3 warning(s)
Hello all,
I am trying to port this
example "Using PocketSphinx with GStreamer and Python" to Vala. I have an
example compiling but I am getting some warnings that I don't understand and a
segmentation fault when running. Also, I am not sure what data types I should
be using for the "text" and "uttid" params in the asrResult ,
asrPartialResult, partialResult and finalResult methods.
My environment is Fedora 16. PocketSphinx .7, latest gstreamer that comes with
Fedora 16. I am using Clutter for the main loop because my application UI will
ultimately be written in Clutter. Any help would be greatly appreciated. Here
are my compile warnings and code .... thanks.
$ valac -X -O2 -g --pkg clutter-1.0 --pkg gstreamer-0.10 --pkg gstreamer-
interfaces-0.10 --pkg clutter-gst-1.0 cmu.vala
cmu.vala:25.24-25.48: warning: unhandled error
GLib.Error' pipeline = (Pipeline)Gst.parse_launch(pipeDef); ^^^^^^^^^^^^^^^^^^^^^^^^^ cmu.vala:11.2-11.26: warning: fieldSphinx.vader' never usedprivate Gst.Element vader;
^^^^^^^^^^^^^^^^^^^^^^^^^
cmu.vala:112.6-112.26: warning: local variable `sphinx' declared but never
used
var sphinx = new Sphinx();
^^^^^^^^^^^^^^^^^^^^^
/home/brian/BitBucketRepos/foodie/cmu.vala: In function
‘sphinx_asrPartialResult’:
/home/brian/BitBucketRepos/foodie/cmu.vala:51:2: warning: passing argument 1
of ‘gst_structure_set_value’ discards ‘const’ qualifier from pointer target
type
/usr/include/gstreamer-0.10/gst/gststructure.h:117:25: note: expected ‘struct
GstStructure ’ but argument is of type ‘const struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala:52:2: warning: passing argument 1
of ‘gst_structure_set_value’ discards ‘const’ qualifier from pointer target
type
/usr/include/gstreamer-0.10/gst/gststructure.h:117:25: note: expected ‘struct
GstStructure ’ but argument is of type ‘const struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala:54:2: warning: passing argument 1
of ‘_gst_structure_copy0’ discards ‘const’ qualifier from pointer target type
cmu.vala.c:287:17: note: expected ‘gpointer’ but argument is of type ‘const
struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala: In function ‘sphinx_asrResult’:
/home/brian/BitBucketRepos/foodie/cmu.vala:65:2: warning: passing argument 1
of ‘gst_structure_set_value’ discards ‘const’ qualifier from pointer target
type
/usr/include/gstreamer-0.10/gst/gststructure.h:117:25: note: expected ‘struct
GstStructure ’ but argument is of type ‘const struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala:66:2: warning: passing argument 1
of ‘gst_structure_set_value’ discards ‘const’ qualifier from pointer target
type
/usr/include/gstreamer-0.10/gst/gststructure.h:117:25: note: expected ‘struct
GstStructure ’ but argument is of type ‘const struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala:68:2: warning: passing argument 1
of ‘_gst_structure_copy0’ discards ‘const’ qualifier from pointer target type
cmu.vala.c:287:17: note: expected ‘gpointer’ but argument is of type ‘const
struct GstStructure ’
/home/brian/BitBucketRepos/foodie/cmu.vala: In function ‘sphinx_app_message’:
/home/brian/BitBucketRepos/foodie/cmu.vala:77:2: warning: passing argument 1
of ‘_gst_structure_copy0’ discards ‘const’ qualifier from pointer target type
cmu.vala.c:287:17: note: expected ‘gpointer’ but argument is of type ‘const
struct GstStructure *’
cmu.vala.c: In function ‘_vala_main’:
/home/brian/BitBucketRepos/foodie/cmu.vala:107:15: warning: ignoring return
value of ‘clutter_init’, declared with attribute warn_unused_result
Compilation succeeded - 3 warning(s)
Thanks for interesting feature. I suppose the working example is here
http://cmusphinx.sourceforge.net/wiki/gstreamer