-
Notifications
You must be signed in to change notification settings - Fork 74
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
wasm-ld: error: duplicate symbol #16
Comments
Is it compiling both the library and exe into one package? Only the library would be needed. |
Thanks for the tip. I managed to build working piper wasm with some code modifications and extra flags /piper-wasm/modules/emsdk/upstream/emscripten/em++ -Wall -Wextra -Wl,-rpath,'$ORIGIN' -Wall -Wextra -Wl,-rpath,'$ORIGIN' @CMakeFiles/piper.dir/objects1.rsp -o piper.js @CMakeFiles/piper.dir/linklibs.rsp -lworkerfs.js -O3 -s INVOKE_RUN=0 -s MODULARIZE=1 -s EXPORT_NAME="createPiper" -s EXPORTED_FUNCTIONS="[_main]" -s EXPORTED_RUNTIME_METHODS="[callMain, FS, WORKERFS]" -s WASM_BIGINT=1 -s INITIAL_MEMORY=64mb -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4gb -s ENVIRONMENT=worker -s STACK_SIZE=5MB -s DEFAULT_PTHREAD_STACK_SIZE=2MB --preload-file p/src/piper_phonemize_external-build/ei/share/espeak-ng-data@/espeak-ng-data There are still some manual steps involved where I comment out Anyway, you can check out demo here. Real-time factor in wasm is ~0.5 on my M2 vs. 0.04 using native build - so still room for improvements. If you are interested to incorporate these changes into piper so emscripten build is smooth, please contact me, else you can close this issue. Piper is great! |
any particular build step that fails? |
On M2 (arm) I had to build onnxruntime using amd64 platform git clone --depth 1 --branch v1.14.1 https://github.com/microsoft/onnxruntime.git modules/onnxruntime
docker run -it -v $(pwd)/modules/onnxruntime:/onnxruntime -w /onnxruntime --platform linux/amd64 debian:12.1 inside docker
|
Hi @jozefchutka Thanks! |
Hi @torphix Follow https://github.com/wide-video/piper for changes in sources and https://github.com/wide-video/piper-wasm for build steps. I was not able to automate the build steps and there are a lot of manual changes involved. If you manage to improve the process please make a PR into https://github.com/wide-video/piper-wasm |
I am trying to compile piper with emscripten and so have it running in browser. I have come quite far including compiling onnxruntime, espeak-ng now I am stuck on some final steps with piper_phonemize build:
piper_phonemize is being built as a part of piper build process which I start with:
I was able to fix a few issues during the build, however I can not figure out how to resolve
duplicate symbol
errors from wasm-ld.any help will be much appreciated
The text was updated successfully, but these errors were encountered: