examples : fix nthread parsing in whisper.wasm (#2938)

This commit fixes the nthread parsing in the whisper.wasm example when
using the `Threads` slider to change the number of threads to be used.

Currently this results in the following error:
```console
main.js:5597 Uncaught TypeError: Cannot convert "5" to int
    at checkAssertions (main.js:5597:21)
    at Object.toWireType (main.js:5611:15)
    at Object.full_default (eval at new_ (main.js:5292:27), <anonymous>:10:26)
    at whisper.wasm/:649:42
```
This commit is contained in:
Daniel Bevenius 2025-03-24 14:40:00 +01:00 committed by GitHub
parent c7941d5ccc
commit ee6286c35d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -614,7 +614,7 @@
var nthreads = 8;
function changeThreads(value) {
nthreads = value;
nthreads = parseInt(value, 10);
document.getElementById('threads-value').innerHTML = nthreads;
}