Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

espeakng.js emscripten build pipeline fails #1543

Open
hennsn opened this issue Nov 18, 2022 · 2 comments
Open

espeakng.js emscripten build pipeline fails #1543

hennsn opened this issue Nov 18, 2022 · 2 comments

Comments

@hennsn
Copy link

hennsn commented Nov 18, 2022

Hi guys,

The emscripten build pipeline for building the following files:
espeakng.js
espeakng.worker.data
espeakng.worker.js

... unfortunately fails for me.

I tried to reproduce all steps in this google colab and step by step modified the setup to make it work: https://colab.research.google.com/drive/1Ah_WimDCdFKZSkwKBU3Q5SyHTVVdB6Tl?usp=sharing

The main things I changed to make it work are:

  1. in espeak-ng/src/ucd-tools rename CHANGELOG.md to ChangeLog.md
  2. run 'emmake make clean' before 'emmake make src/libespeak-ng.la' to prevent the .o error (as referenced here: Failing to compile espeak-ng.js with emscripten under MacOS #243)
  3. in src/speechPlayer/src/SpeechWaveGenerator.cpp: comment out 'using namespace std;' => solution found here: https://stackoverflow.com/questions/69558602/reference-to-function-is-ambiguous-in-c

I hope this helps and the changes maybe can be integrated with a future update.

Thanks a lot for this awesome project!

Kind regards

@synesthesiam
Copy link

I got it to work, but had to make several changes:

  1. In src/ucd-tools/autogen.sh change "ChangeLog.md" to "CHANGELOG.md"
  2. Add emmake make clean before every emmake make step
  3. In emscripten/Makefile, replace "python" with "python3"
  4. In emscripten/Makefile, add to EM_CXXFLAGS: -s EXPORTED_RUNTIME_METHODS=addFunction,removeFunction -s EXPORTED_FUNCTIONS="['_malloc', '_free']"

I also did my ./configure a little different:

./configure --prefix=/usr --without-async --without-mbrola --without-sonic --without-pcaudiolib --without-klatt --without-speechplayer --with-extdict-cmn

@jpg-gamepad
Copy link

jpg-gamepad commented May 22, 2023

Thank you so much, I got stuck on step 4 of your comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants