command.wasm : add voice assistant example for the Web (#171)

Same as the command-line tool "command", but runs in the browser

Also, added helper script "extra/deploy-wasm.sh" and fixed some timing
constants for the WASM examples.
This commit is contained in:
Georgi Gerganov
2022-11-26 11:40:06 +02:00
parent c536ff4005
commit 68ecadbbc9
12 changed files with 939 additions and 28 deletions

View File

@ -13,6 +13,8 @@ More info is available in [issue #171](https://github.com/ggerganov/whisper.cpp/
https://user-images.githubusercontent.com/1991296/204038393-2f846eae-c255-4099-a76d-5735c25c49da.mp4
Web version: https://github.com/ggerganov/whisper.cpp/examples/command.wasm
## Building
The `command` tool depends on SDL2 library to capture audio from the microphone. You can build it like this:

View File

@ -535,7 +535,7 @@ int main(int argc, char ** argv) {
bool is_running = true;
bool have_prompt = false;
bool ask_prompt = true;
bool ask_prompt = true;
float prob0 = 0.0f;
float prob = 0.0f;