Bw tool in sphinxtrain cannot open mdef file on Windows - cmusphinx

I am developing an speech recognition application using Sphinx4. I am trying to do acoustic model adaptation. I have followed every step of the instruction on the http://cmusphinx.sourceforge.net/wiki/tutorialadapt tutorial. However, in the step where i need to run the bw, it cannot open the mdef file and shows an Debug Assertion Fail.
I have been working on this for days but still dont know how to solve it. I am using Windows 10, ptm model, visual studio 2015, the latest sphinx4 5prealpha version.

I just found out the answer. I think it could have been because that i forgot to download Perl or something went wrong during my installation of Sphinxbase.
I first installed Perl. However, it still didnt work, so i re-built Sphinxbase and copied it back to Sphinxtrain, and it finally run.
p/s Thanks Nikolay for your help :)

This comment / solution is just based on my experience as I am not an expert on this. I had this same exact error after following all the instructions from adapting-the-model and looks like the mdef file from sourge-forge is corrupted. So I landed up on a comment on some other website where it mentioned to download the setup files for pocketsphinx, sphinxbase and sphinxtrain from github directly. So I downloaded it from here GitHub and followed the same steps from before. Since I was working on windows, I rebuilt using VS Studio later, after upgrading the project from 2012 to latest version.
Steps (from GitHub)-
You should download and unpack it to the same parent directory as PocketSphinx, so that the configure script and project files can find it. On Windows, you will need to rename 'sphinxbase-X.Y' (where X.Y is the SphinxBase version number) to simply 'sphinxbase' for this to work.
To compile the SphinxTrain under MS Visual Studio 2010
load SphinxTrain.sln located in SphinxTrain directory
compile all the projects in SphinxTrain (from SphinxTrain.sln)
MS Visual Studio will build the executables under .\bin\Release or .\bin\Debug (depending on the version you choose on MS Visual Studio), and the libraries under .\lib\Release or .\lib\Build.
Once you finished with compilation, copy the pocketsphinx and sphinxbase tools and dlls from sphinxbase\bin\Releae and pocketsphinx\bin\Release to sphinxtrain\bin\Release folder. This will enable you to run the training process which expects to see all the tools and libraries in sphinxtrain\bin\Release.

Related

error cannot open file 'kernel32.lib'

I have installed VS2013 and VS2015 on Windows 7.
I have an existing C++ Dll project that was building fine but now all of a sudden it wont build using VS2015 and gives me the error:
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
From this post: fatal error LNK1104: cannot open file 'kernel32.lib' I went looking for the kernel32.lib file and it is located here:
C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86
When I go to my Projects Properties-->Linker-->Input and select Macros I see that this path is indeed there:
My Platform Toolset is set to Visual Studio 2013 - Windows XP (v120_xp) which is what it always has been set to.
Why has my Project all of a sudden stopped building? What could have gone wrong?
I had this similar problem today with Visual Studio 2013 when I changed my VC++ Directories:
Project->Properties->VC++ Directories:
Include Directories
If the cause is some plug-in/extension that changes your props files, it may in consequence change the "Visual C++ Directories" settings of your project.
So, the solution that worked for me is described on my own answer Can't compile 64 bits Visual Studio 2010 projects, which I fully transcribe to here:
After I asked a colleague for help, we noticed, that even getting
clean builds of the projects from TFS, with overwrite option, the
Project's Configuration Properties > VC++ Directories on my computer
were always different from other computers.
Searching more we found the solution on the last post of Reset
include/lib path, which I will fully transcribe:
use "del %HOMEPATH%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props"
is not always the right way.
Better use "del %USERPROFILE%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props"
where the application data folder is normally placed in.
Then I've looked inside the contents of Microsoft.Cpp.x64.user.props
and I've seen that there were things added by Visual Leaks Detector.
Which is reasonable, as one month before, I did a memory leak analysis
using VLD.
So, I deleted the file and now everything compiles fine at 64bits!
I had to install the Visual C++ for Desktop Development.
Open Visual Studio Installer and go to Installed tab. Click on the Change Button on your installed Visual Studio Community Edition. -> On the Workloads Tab there should be a option Desktop Development with C++. Activate that option and modify the changes.
Afterwards it was working for me.
I had the same problem today. As it turned out somehow the SDK 10.0.15063.0 got installed on my system but without the Desktop C++ files. Selecting the SDK in the list of installed programs, doing a change install and there selecting the Desktop C++ options added the necessary files and now I can link again.
I got this error fatal error lnk1104: cannot open file 'kernel32.lib'.
this error is getting because there is no path in VC++ directories.
To solve this probelem
open visual studio 2008
go to Tools-options-Projects and Solutions-VC++ directories-*
then at right corner select Library files
here you need to add path of kernel132.lib
In my case It is C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
Thank you.
I had this following upgrade of some projects from VS2013 to VS2017.
Original project had a manual modification to the "Library Directories" item under VC++ Directories in the project settings.
This meant it did not pick up changes from the upgrade.
Using the option will reset this to something that works (assuming the SDK is installed OK) provided anything other than the default is not needed of course. In my case it was trying to point at the v7.1 SDK but that was not installed for vs2017.
in vs 2019, just run the installer, click modify, and then in the individual components tab, remove windows 10 SDK. then again run the installer and add windows 10 sdk!
I had this similar problem today with Visual Studio 2017. My cause turned out to be a bad environment setting in NETFXSDKDir, specifically:
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1
It needed to have a value of:
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\um\x86
I have a more detailed response here:
fatal error LNK1104: cannot open file 'kernel32.lib'
In VS 2022 I was trying to compile an old solution that originally ran in VS 2010 then in VS 2019. It continually gave me the "cannot find Kernel32.lib" error. I spent 8 hours trying everything, including everything on this page. What worked for me: Configuration Properties -> VC++ Directories -> Library Directories and "inherit from parent" (guessing this sets to defaults) fixed this for me. Also note: I'm using winsock and directinput.

installing Help viewer without installing visual studio

I want to take some of MSDN help files offline on a windows machine which does not have visual studio installed on it. the problem is that I cannot find a way to get and install Help Library manager and Help viewer without installing the visual studio or sql server.
How can I install them without installing the visual studio or sql server?
I just wrote an answer on how to do this for an older question, which can be found here.
For convenience, here are the essential steps to get Help Viewer 2.2 to run without going to the trouble of installing a complete copy of Visual Studio 2015:
Most of the files required by HlpViewer.exe can be found on the Visual Studio DVD in two different MSI packages. By passing some additional command line arguments to msiexec, it's quite easy to install them manually:
msiexec.exe /i help3_vs_net.msi VS_SETUP=1
msiexec.exe /i vs_minshellcore.msi MSIFASTINSTALL="7" VSEXTUI="1"
While this installs most necessary files, it doesn't account for all of them ... to keep things simple, I copied the rest of them from a working installation on another computer:
C:\ProgramData\Microsoft\HelpLibrary2
Essentially only contains a CatalogType.xml and some empty directories.
C:\Program Files (x86)\Microsoft Help Viewer\v2.2\CatalogInfo\VS11_en-us.cab
Moreover, it's necessary to provide the application with a valid ContentStore path by importing the following .reg file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.2\Catalogs\VisualStudio14]
"LocationPath"="%ProgramData%\\Microsoft\\HelpLibrary2\\Catalogs\\VisualStudio14\\"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Help\v2.2\Catalogs\VisualStudio14\en-US]
"SeedFilePath"="C:\\Program Files (x86)\\Microsoft Help Viewer\\v2.2\\CatalogInfo\\VS11_en-us.cab"
"catalogName"="Visual Studio Documentation"
Finally, I created a new Application Shortcut and changed its Target: to read as follows:
"C:\Program Files (x86)\Microsoft Help Viewer\v2.2\HlpViewer.exe" /catalogName VisualStudio14 /launchingApp Microsoft,VisualStudio,14
Et voilà!, with that HlpViewer.exe should finally execute without any problems!
In MSDN to USB v2.5, you don't have to have any Visual Studio IDE installed:
https://stackoverflow.com/a/66595500/3268088
I know its old question. I just run into a problem involving Help Viewer.
my recovery steps are :
get sqlexress installer (if you haven't got one)
after extracting the files, check its folder and find for "help" folder
I got mine "SQLEXPRWT_x64_ENU\redist\VisualStudioShell\Help\x64"
run install.exe with administration priveleges (Run as Administrator)
all done.

Cocos2d-x MSVS template install script not found

I've downloaded the stable version of cocos2d-x 2.1.4 to use on Microsoft Visual Studio 2012 Professional.
However, as I run install-templates-msvc.bat, running the script causes the following errors:
Couldn't find script file "<cocos2d-x directory>\cocos2d-x-2.1.4\template\msvc\InstallWizardForVS2012.js"
Couldn't find script file "<cocos2d-x directory>\cocos2d-x-2.1.4\template\msvc\InstallWizardForVS2012Express.js"
Same errors for VS2010 and VS2010Express also appears.
As I search in the template folder in cocos2d-x directory, there is no folder named msvc.
So I have 2 questions:
I'm wondering why this is happening, because I did not modify a single file from the zipped version of the download (I've also tried downloading it again).
Building the solution cocos2d-win32.vc2012 terminates with 2 errors, one for Watermelon something and another for CocosdragonJS. My temporary attempt was to remove them from the solution, but I'm wondering if there are any fancier solution. Perhaps I missed something at installation?
Try Cocos2dx rc0 2.1.3 It worked for me or copy .txt file in .sln project then remove it. MSVS Ultimate edition automatically fixes the errors.
https://github.com/cocos2d/cocos2d-x/commit/0885d64a20d6862d4e99c381d97acf026654a8a3
[Win32] Deleting vs template, please use 'tools/project-creator' to create multi-platform project instead.

VS2012 Install Shield project building using TFS build definition

I have a VS2012 sln which includes an install shield installer project.
If I build the solution/projects manually via solution explorer everything builds fine.
However when using the TFS build definitions i get the following error:
C:\Builds\1\<NAME>\<Build_Definition_Name>\Sources\InstallSetup\InstallSetup.isproj (29): The imported project
"C:\Program Files (x86)\MSBuild\InstallShield\2012SpringLimited\InstallShield.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Can someone please help with this?
Info:
Using VS 2012
OS - Win 7 x64 Pro
You need to install InstallShield on the machine on which you are running the build.
In-case someone is facing the same issue, I was able to solve it by reading what Flexera mentioned on their website: Link
Brief description: in build definition, process tab, make sure the MSBuild Platform is targeting x86.
I too had 64bit Windows (8.1) running and Team Foundation Server 2013 Express.

Various issues installing igraph in Visual Studio 2010 and Cygwin/MinGW ("sys/time.h not found")

I couldn't get igraph to work with Visual Studio 2010 (supposedly many known issues), and so decided to try installing it in Cygwin. ./configure went fine. But make gave this error:
f2c/dtime_.c:16:23: fatal error: sys/times.h: No such file or directory
Makefile:2190: recipe for target `libf2c_la-dtime_.lo' failed
make[3]: *** [libf2c_la-dtime_.lo] Error 1
I tried installing it in MinGW and get the same error when I make. Should I be providing "sys/time.h" or a path to it? Where is sys/time.h? Using Windows 7.
Edit
The problems in Cygwin and MinGW was due to the wrong version of gcc being used by my clean installation of Cygwin (and a characteristic of MinGW). Solution here: Installing/compiling in Cygwin/MinGW - How to set the include "path"? (symbolic link?)
The problem in Visual Studio 2010 was due to building in "Debug" instead of "Release". One of igraph's creator, Gábor Csárdi, graciously provided an excellent step-by-step guide below that identified and resolved it.
Igraph actually does work with Visual C++ 2010 Express, we test this before releases, and I have just tried it. You need to do the following steps.
Download the source package specifically created for Visual Studio.
Uncompress the file into My Documents\Visual Studio 2010\Projects.
Open the igraph.sln solution file in igraph-0.6-msvc\igraph-0.6-msvc directory from Visual Studio.
Visual Studio offers to convert the solution file to the current format, do that. Just click on Next, Next and Finish.
On the toolbar, change 'Debug' to 'Release' to make release builds.
Choose Debug -> Build solution and wait until the library is built.
To test it you can open the solution file in the igraphtest directory, convert it as well, choose 'Release' builds, and then build it and run it from the command line. It is a simple C++ program that uses igraph to create a graph and write it into the file out.txt.
You don't have to set up include and library directories at all, everything is set up properly in the solution file, both for igraph and igraphtest.
is there an sys/times.h file?
I have a vague memory that I had to make that symlink on a system once.

Resources