Live recognition via HTK on OS X ERROR [+6306] OpenAsChannel: Audio input not supported - osx-snow-leopard

My objective is doing live recognition via HTK 3.4.1 on OS X.
First, I did it on Ubuntu 10.0.4.
After I generated acoustic and language model, also everything it need.
I execute this command to do live recognition.
HVite -H am/tiehmm2m_5/newMacros \
-C config/liverecog.config \
-w lm/dgs.wdnet \
config/dgs.dict \
config/tie.list
Everything work fine for me.
Then I try to port it to run on my OS X, with the same code. I can do everything such as generate model or recognition.
But I got an error like this when I did live recognition.
READY[1]>
ERROR [+6306] OpenAsChannel: Audio input not supported
FATAL ERROR - Terminating program HVite
How can I solve this error? Anyone face this error before?
Thanks in advance.

It says that input on OSX is not supported. Not supported means that some feature is not implemented in the code. If you need this feature you have to implement it or look for another tool which fits your needs.
The reason that OSX is different is that audio input subsystem in OSX (CoreAudio) is quite different from the one from Linux (OSS). You just need to implement audio input on OSX from scratch.

Related

ALSA + Qualcomm board

I have a board that has a Qualcomm Snapdragon 210 (MSM8909).
It's running a stock kernel (https://github.com/android-linux-stable/msm-3.18) with a Debian Stretch sysroot.
I got the sound working (by routing the DAI Frontends to the correct Backend) using the mixer_paths.xml file as an example, but I'm having some weird issues with Alsa and specific programs.
For instance, if I want to use the nrsc5 project (which uses libao for sound output), I got this error message and no sound at all:
[ 6285.810132] msm_pcm_playback_copy: wait_event_timeout failed
Same happens with mpd (using alsa with the default hw:0,0).
However, if I use mplayer, it works (I get some errors related to ctrl not found, but not big deal, I don't have a volume control in the end).
Same if I use aplay with wave files.
I tried to install pulseaudio and configure alsa as a default source, it "works", but it drops like crazy (and it doesn't use CPU at all). Mplayer says that
"Audio device got stuck!"
The kernel that I'm using should have a patch that Qualcomm released about an error handling the timeouts (I checked this).
A quick note on the errors that I receive about the ctrl not found: Seems that the driver doesn't expose the "substream runtime"s, or something like that. However, I can modify the volume using some amixer commands (similar to the ones used in the DragonBoard410c, but tweaked accordingly to the mixer_paths.xml)
I don't know what else to do, because some apps that I would like to run, don't work properly, and they should.
Thanks!

Getting raw multitouch data with libinput

I'd like to get the raw multitouch data from my touchpad in order to.
I've tried using libevdev but my success was limited and I couldn't do what I wanted. I found out about libinput which might be more abstracted, and found out how to use it to automatically get the gestures (for example using libinput-debug-events) but I find them limited and would like to get the raw input (with each finger's movement).
Is there any way to do this with libinput, or not?
I couldn't find any helpful documentation: I found this one but couldn't find any example or route to follow. Actually, I think that I could make myself a way through my problems if I understood how to use these functions, but it's far from clear, and I'm getting in a lot of trouble installing libinput itself (for example, commands like libinput debug-gui aren't recognized by my system).
Any help is appreciated.
Don't know if this helps or not, but on my distro (Ubuntu) I installed libinput-tools.
sudo libinput debug-gui
Also gives me an error:
debug-gui is not a libinput command or not installed.
However,
sudo libinput debug-events
will print out events in the terminal just fine.

Starting a graphical application using sfml on Raspberry Pi boot

I would like to make a Graphical interface for a home-made program using SFML on Raspberry Pi2. I am using Raspbian. I recompiled the graphical lib
It works fine unsing startx first, then using my application, which wors perfectly fine.
But I can't figure if it is possible or how to launch my application directly after boot without launching startx (just to optimise the cpu of the Raspberry).
Starting my program direcly after boot, I get the following error:
Failed to open X11 display: make sure the DISPLAY environnement variable is set correctly.
Aborted.
I already tested the classic export DISPLAY=:0.0 but without sucess.
I interested myself in x and xinit, but I am not sure that would even do it.
Where should I start looking? I don't need a complete solution, even a hint or an idea would be nice!
I checked to see if it was possible to open a graphical app without the X desktop environment and as that answer states, with Firefox at least, you need the X server which SFML also probably needs in order to create a window.
The answer states:
Basically something like:
$ X
Then you just start Firefox in this X server:
$ DISPLAY=:0 firefox
You can switch from the X server and the framebuffer by using
CTRL+ALT+F1 and CTRL+ALT+F7.
You could try that and see if it helps.
Also, still searching, I found a forum post on the sfml website about what you're trying to accomplish stating somewhere:
SFML requires OpenGL, so as far as I know you need at least X running,
but you probably don't need gnome, KDE or a similar Desktop
Environment on top.
The forum guy asking for help seems to have managed to get X11 and a SFML basic render window to work on Ubuntu server after someone posted a link to xinitrc. I guess, that's the route to go from here.

How to install Xlib on Windows (eclipse , c language)

Ok, I need to use this for graphical programming, GUI, for cs 349 uwaterloo first assignment. I see random Xlib.h and Xutil.h files lying around on google search results. But no where does it say how I install or download Xlib from some website of something. I even tried to copy paste the Xlib.h onto a new files I created in my blank project and it has more than 100 errors. So... what do I do?
Simpliest way is to install cygwin - you'll get gcc + other tools (binutils, make, autotools) and X server and client libraries.
If C/C++ language is not a requirement I suggest to look at python or javascript clients - both are easy to install and don't require X runtime at all (they implement X11 wire protocol themselves).

Serial Port Program crashes (no core dump)

im making a C project for university in Linux, its basicaly a protocol for file transfer between 2 computers. The program works fine and it sends many files without any problem, but there is 1 or 2 files i have tested and the program just crashes without any report and i just dont know how to debug the problem. Any help would be appreciated.
I also dont know if i should post the code or not, because both files (application and protocol) have over 1.5k lines of code.
In most Linux Distributions the core dumping is disable by default (which can be viewed from the system resource limit "ulimit -c" will be zero if it is disabled). To enable the same, use "ulimi -c unlimited".
To add, in Ubuntu like modern distributions, they have customized program to send the report/core file to Ubuntu developers specified in "/proc/sys/kernel/core_pattern". Make sure to change it for development purpose to debug further.
You can even try "valgrind" or "gdb live debugging" to have more clarity about the problem.

Resources