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

Feature Request: also provide models in torchscript. #104

Open
SR-Lut3t1um opened this issue Feb 19, 2024 · 8 comments
Open

Feature Request: also provide models in torchscript. #104

SR-Lut3t1um opened this issue Feb 19, 2024 · 8 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@SR-Lut3t1um
Copy link

Request in title.

Would be really helpful to integrate WhisperSpeech easily into e.g. android.

@SR-Lut3t1um SR-Lut3t1um changed the title Feauture Request: also provide models in torchscript format. Feauture Request: also provide models in torchscript. Feb 19, 2024
@SR-Lut3t1um SR-Lut3t1um changed the title Feauture Request: also provide models in torchscript. Feature Request: also provide models in torchscript. Feb 19, 2024
@zoq zoq added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 28, 2024
@zoq
Copy link
Contributor

zoq commented Feb 28, 2024

Technically this should be possible, I marked this as a good first issue, in case someone likes to take a closer look into this.

@jpc
Copy link
Contributor

jpc commented Feb 28, 2024

It may be worth looking into the recent ExecuTorch as a possible alternative.

WhisperSpeech already works with torch.compile but I think we had some issues with torch.export around our implementation of RoPE.

@BBC-Esq
Copy link
Contributor

BBC-Esq commented Feb 29, 2024

This also worked:

ffmpeg -hide_banner -loglevel panic -i "test 1.mp3" -threads 1 -acodec pcm_s16le -ac 1 -af aresample=resampler=soxr -ar 16000 "test.wav" -y

@SR-Lut3t1um
Copy link
Author

It seems to be that Executorch isn't compatible with Androids NNAPI. However I'm unsure if that leads to worse performance.

@gongouveia
Copy link

Hello, @SR-Lut3t1um is exporting as .onnx a good alternative?

@SR-Lut3t1um
Copy link
Author

Well, according to the pytorch docs torchscript is required, so I'm afraid. onnx isn't going to be an alternative for that use case.

@gongouveia
Copy link

I am pretty sure it is possible to use ONNX Runtime and the NNAPI execution provider.
perhaps converting to ONNX may be less of a hassle

@SR-Lut3t1um
Copy link
Author

Yeah onnx should be fine too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Development

No branches or pull requests

5 participants