microphone not starting after one iteration in sphinx - cmusphinx

I am using CMU sphinx library, but after successfully running one iteration, this error appears "Can't open microphone line with format PCM_SIGNED 16000.0 Hz, 16 bit, mono, 2 bytes/frame, big-endian not supported." Cannot start microphone. When run on eclipse in ubuntu 12.10, code works fine for all iterations. Why is this error appearing when using eclipse in Windows 7 ?

If you have something like this in your config xml file:
<component name="microphone"
type="edu.cmu.sphinx.frontend.util.Microphone">
<property name="closeBetweenUtterances" value="false"/>
</component>
try to change "false" too "true" and rebuild.

Related

Can't read .avi files using Python OpenCV 4.1.2-dev

I wanna run my opencv3.1 programs, but when i try to read a file using cv2.VideoCapture shows me the error:
error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): ./../images/walking.avi in function 'icvExtractPattern'
But, when i using the camera with cv2.VideoCapture(0) it works perfectly. I verify the file path and using the relative and the absolute path, but still not working.
I gonna wait for your answers.
Thanks a lot
Originally I used cv2.VideoWriter_fourcc(*'XVID') getting the same error
switch the (*'XVID') to (*'MJPG')
I am using a raspberry pi Gen. 4 (4GB) with image: Raspbian Buster Lite

window decorations in xfce missing

The below image shows pavucontrol on my Debian 10 running xfce-Desktop.
One can see that for example the menus in the menu bar are written next to each other without space (WiedergabeAufnahmeAusgabegeräte...). Other window decorations are also missing. If it was html, I would bet on a misconfigured css.
The menu entries are also displayed without space in other applications, e.g. xfce4-terminal.
I wanted to keep the xfce installation mimimal, so I installed xfce using:
apt-get install lightdm xfce gtk3-engines-xfce xfce4-goodies xfce4-power-manager
Does somebody know how to fix this?
It should look like this:
Credits go to Stéphane Gourichon:
Launching xfce4-appearance-settings I changed the theme for Xfce to Adwaita.
The corresponding config files are ~/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml (per user) and /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml (system-wide).
The entry in there changed from
<property name="ThemeName" type="string" value="Xfce"/>
to
<property name="ThemeName" type="string" value="Adwaita"/>

nw.js node WebKit - unable to play audio file

I have started working with nw.js, creating a test app to play audio files from. I am working on OS X 10.11.
The code for the player is:
<audio id="audio_player" controls>
<source src="path/to/file/song.mp3" type="audio/mp3">
</audio>
The player and controls appear, but the file will not play. I have tried using a relative path, and an absolute path, trying both
"/path/to/file/song.mp3"
and
"file:///path/to/file/song.mp3"
schemes.
I have verified the path is valid in all cases.
This page:
http://docs.nwjs.io/en/latest/For%20Developers/Enable%20Proprietary%20Codecs/
tells me that mp3 should be supported (for v0.22.1+, though I haven't found a way to tell the version of my mp3, though is was made recently so I assume is the the latest codec.)
Just to try more stuff, I followed the instructions on these pages:
http://docs.nwjs.io/en/latest/For%20Developers/Enable%20Proprietary%20Codecs/
(It appears mp3 gained support since this doc came out.)
https://github.com/nwjs/nw.js/wiki/Using-MP3-%26-MP4-%28H.264%29-using-the--video--%26--audio--tags.
I downloaded the ffmpeg libs from here:
https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases
and placed copies here:
find . -name libffmpeg.dylib
./dist/nw.js-examples/osx64/nw.js-examples.app/Contents/Versions/67.0.3396.87/libffmpeg.dylib
./node_modules/nw/nwjs/nwjs.app/Contents/Versions/54.0.2840.99/nwjs Framework.framework/libffmpeg.dylib
./node_modules/nw-builder/cache/0.31.2-sdk/osx64/nwjs.app/Contents/Versions/67.0.3396.87/libffmpeg.dylib
cp ~/Downloads/libffmpeg.dylib ./dist/nw.js-examples/osx64/nw.js-examples.app/Contents/Versions/67.0.3396.87/libffmpeg.dylib
cp ~/Downloads/libffmpeg.dylib "./node_modules/nw/nwjs/nwjs.app/Contents/Versions/54.0.2840.99/nwjs Framework.framework/libffmpeg.dylib"
cp ~/Downloads/libffmpeg.dylib "./node_modules/nw-builder/cache/0.31.2-sdk/osx64/nwjs.app/Contents/Versions/67.0.3396.87/libffmpeg.dylib"
Still to no avail running either
npm run dev
or
npm run prod
and opening the packaged app.
I can play the file fine with the same code from a web browser.
I don't know what else to try, help would be much appreciated, thanks.

MPEG DASH:using Gpac to get MPD files

My goal is to convert some mpeg4 files in my hard disk into mpd files that will alllow me to use it in mpeg dash streaming .i read about gpac's MP4Box capability to create mpd files and i followed the instructions of the following link to successfully compile gpac for ubuntu like in the instructions in this two links
http://gpac.wp.mines-telecom.fr/2011/04/20/compiling-gpac-on-ubuntu/
http://gpac.wp.mines-telecom.fr/2012/02/01/dash-support/
But when i try to execute any command such as
MP4Box -dash 10000 -frag 1000 -rap myFile.mp4
I get the following error
Option -dash unknown. Please check usage
I wonder is there any commands or instructions that i must execute when building gpac to add the dash and if is there any other methods to get my own MPD File not those provided by itec.
Thanks in advance !!!
Try to follow the compile instruction carefully & make sure to fetch the latest version from SVN.
MP4Box should work with your commands.
looks like you are using a outdated version of MP4Box. try downloading and compiling the latest one from here (for me the same command works): http://gpac.wp.mines-telecom.fr/downloads/gpac-nightly-builds/

How to use protobuf-csharp-port from unix

We've been using protocol buffers, and are generating the c++ and python files with protoc, and the c# files with protobuf-csharp-port. At the moment these are done separately, the c++ and python from linux and the c# from windows. We'd like to have one script generate all of these, running in linux.
To do this I'm trying to run ProtoGen.exe with mono, but it's not producing any output. The following command runs, but produces no cs files, and no errors.
mono ../cs/Packages/Google.ProtocolBuffers/tools/ProtoGen.exe --protoc_dir=/usr/local/bin/ ./subdir/simple_types.proto
I've got a feeling that I'm missing something simple.
I don't think I've tried running protoc from ProtoGen.exe on Linux. I'm surprised that it doesn't have any errors, but we can definitely look into that. (If you fancy raising an issue, that would be really helpful - or I'll do it when I get the chance.)
For the moment, I suggest that you run protoc first, using --descriptor_set_out to produce a binary (protobuf) version of the .proto file. That's what ProtoGen.exe is trying to do first, and failing by the sounds of it.
Once you've got the binary version of your message descriptor (I'd call it simple_types.pb), you can run ProtoGen.exe on that. It's been a while since I've done this, but I believe you should be able to just run
mono ../cs/Packages/Google.ProtocolBuffers/tools/ProtoGen.exe ./subdir/simple_types.pb
... and it should magically work.
As a horrible alternative, you could try symlinking protoc.exe to protoc in your binary directory. Fundamentally I suspect that's what's going wrong :)
my script
protoc "--proto_path=$SRC_DIR" "--descriptor_set_out=x.protobin" --include_imports $SRC_DIR/x.proto
mono $PRJ_HOME/Google.ProtocolBuffers.2.4.1.521/tools/ProtoGen.exe -line_break=Unix x.protobin
protoc and mono were installed via distrib package manager :
# archlinux
pacman -S protobuf mono

Resources