8000 Wasm build and bundle size · Issue #259 · xiph/rnnoise · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Wasm build and bundle size #259
Open
@Jamshoot66

Description

@Jamshoot66

Hello. I try to build latest rnnoise to web assembly (based on https://github.com/wegylexy/rnnoise_wasm) with following script:

emcc \
    -s ENVIRONMENT=worker \
    -s TOTAL_STACK=32mb \
    -s TOTAL_MEMORY=64MB \
    -g0 -O3 --no-entry -Wno-null-dereference \
    -o dist/rnnoise-processor.wasm \
    -Irnnoise/include \
    rnnoise/src/denoise.c \
    rnnoise/src/rnn.c \
    rnnoise/src/pitch.c \
    rnnoise/src/kiss_fft.c \
    rnnoise/src/celt_lpc.c \
    rnnoise/src/nnet.c \
    rnnoise/src/nnet_default.c \
    rnnoise/src/parse_lpcnet_weights.c \
    rnnoise/src/rnnoise_data_little.c \
    rnnoise/src/rnnoise_tables.c \
    src/worklet.c

Where, worklet.c is just a simple wrapper around rnnoise to minify js audio worklet code without any massive code (almost the same as wegylexy's repo). So the problem is the out wasm file size - 15mb for rnnoise_data.c model, and 5,5mb for rnnoise_data_little.c. Is there any way to minify wasm?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0