| Instructions for building the Chrome Extension port of Espeak NG, |
| used on Chrome OS. |
| |
| You can either install emscripten locally, or use docker. I found |
| it easier to use this docker image: |
| https://github.com/apiaryio/emscripten-docker |
| |
| You don't have to install the image first, just make sure docker is installed |
| and in your path, and the commands below will download and use the image |
| automatically. |
| |
| These instructions are only slightly different than emscripten/README.md. |
| The main difference is running autoreconf -fvi before autogen.sh, |
| because otherwise autogen.sh will make symlinks to some GNU autotools |
| files that won't be available to the docker image. |
| |
| # These commands assume bash |
| bash |
| |
| # Build espeak normally first |
| autoreconf -fvi |
| ./autogen.sh |
| ./configure --prefix=/usr --without-async --without-mbrola --without-sonic |
| make |
| |
| # Build emscripten version of ucd-tools |
| cd src/ucd-tools |
| autoreconf -fvi |
| ./autogen.sh |
| cd ../.. |
| docker run --rm -v $(pwd):/src -w /src/src/ucd-tools -ti apiaryio/emcc emconfigure ./configure |
| docker run --rm -v $(pwd):/src -w /src/src/ucd-tools -ti apiaryio/emcc emmake make |
| |
| # Build emscripten version of espeak-ng |
| docker run --rm -v $(pwd):/src -w /src -ti apiaryio/emcc emconfigure ./configure --prefix=/usr --without-async --without-mbrola --without-sonic |
| docker run --rm -v $(pwd):/src -w /src -ti apiaryio/emcc emmake make src/libespeak-ng.la |
| docker run --rm -v $(pwd):/src -w /src/emscripten -ti apiaryio/emcc emmake make |
| |
| # The generated files will go here: |
| emscripten/js/espeakng.js |
| emscripten/js/espeakng.worker.data |
| emscripten/js/espeakng.worker.js |
| emscripten/js/espeakng.worker.wasm |
| |
| # Copy those files to the Chrome extension directory: |
| cp emscripten/js/espeakng* chrome-extension/js/ |
| |
| # To test, open chrome://extensions in Chrome, enable Developer mode, click Load unpacked, |
| # and point it to the chrome-extension directory. |
| |
| # To update the package on Chrome OS, first export a tarball: |
| git archive chrome --prefix=espeak-ng/ | gzip > espeak-ng-1.49.3.2.tar.gz |
| |
| # Version number: the first three components (1.49.3 in the example above) |
| # should match the eSpeak-NG version in CHANGELOG.md, and the fourth component |
| # should be incremented with each new release of the Chrome OS port for |
| # that version. |
| |
| # Next, upload this file to chromeos-localmirror/distfiles and make it |
| # world-readable. |
| # |
| # Then, in the Chromium OS codebase, update the ebuild here to refer to |
| # the new version: |
| third_party/chromiumos-overlay/app-accessibility/espeak-ng |