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

[Experimental] Use blob for decode result instead of base64 #1

Closed
wants to merge 5 commits into from

Conversation

jhen0409
Copy link
Contributor

@jhen0409 jhen0409 commented May 20, 2023

See huggingface/transformers.js#118 (comment).

In Android emulator (Apple M2), the inference time is down from 40s to 10s in Whisper tiny.en example. Since it's using record audio, this difference isn't very absolute.

  • Patch onnxruntime-react-native to output blobId and size instead of base64 data
  • Use JSI function getArrayBufferForBlob from react-native-blob-jsi-helper

The better way will be help onnxruntime-react-native migrate to use JSI, I'm already planning for that.

* Just experimental, so it haven't handle with encode. Also didn't do Blob deletion after decode, so it may be necessary to restart the App frequently to avoid other problems.

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

Successfully merging this pull request may close these issues.

1 participant