cmusphinx / pocketsphinx

A small speech recognizer
Other
3.93k stars 717 forks source link

CMake fail: Checking for module 'gobject-2.0' Can't find gobject-2.0.pc... #315

Closed smbika007 closed 2 years ago

smbika007 commented 2 years ago

Hi, I get this when I pick all the options and hit configure. I uncheck BUILD_GSTREAMER, BUILD_TESTING, and FIXED_POINTED. Not sure which one needed it.

Is there a remedy for this?

I am on Windows 10.

Thanks!

dhdaines commented 2 years ago

Hmm, this shouldn't happen if you unchecked BUILD_GSTREAMER, are you sure that it is disabled?

dhdaines commented 2 years ago

Actually, what has happened is that CMake has probably cached your BUILD_GSTREAMER setting. You need to rerun configuration (and possibly remove CMakeCache.txt)

smbika007 commented 2 years ago

Thanks, that helped. I reran the config with just the BUILD_GSTREAMER unchecked and it succeeded. This doesn't explain why it failed in the first place. I was rather hoping that everything that was needed to fully configure and build pocketsphinx would be contained in the clone of the repo. Also, the app "Live" will not build due to the following errors (just the first few): image am I missing something or is the repo missing something?

Finally, this generates a VS 2019 solution which I attempt to build by right clicking the solution and selecting build. Is there a preferred approach.

Sorry to be so much of a challenge but I did not have these problems when I built and used the dlls when I got the 5prealpha source from source forge.

dhdaines commented 2 years ago

I'm not sure if there's a preferred approach, but I'm testing using Visual Studio Code and the CMake and C++ extensions.

Getting "live" working on Windows will be a challenge indeed, because it uses an external program (SoX) to get an audio stream. This was done intentionally because the audio code was difficult to maintain and not very portable. It's assumed that if you are building an application on Windows that uses audio, you know how to get your own audio stream.

That said, it ought to build - I think popen is called _popen on Windows, and pclose is _pclose. I will fix the example code.

dhdaines commented 2 years ago

Also, consider using the Python module, which should have no trouble doing audio on Windows and Mac OS X.

dhdaines commented 2 years ago

This is really the same problem as #316 ...

smbika007 commented 2 years ago

Also, consider using the Python module, which should have no trouble doing audio on Windows and Mac OS X.

I would if I could :-)

smbika007 commented 2 years ago

That said, it ought to build - I think popen is called _popen on Windows, and pclose is _pclose. I will fix the example code.

Thanks - I will keep an eye out for it!

dhdaines commented 2 years ago

This is actually fixed by #319, I closed it too soon.