talk.wasm : GPT-2 meets Whisper in WebAssembly (#155)

* talk : initial real-time transcription in the browser

* talk : polishing the UI

* talk : ready for beta testing

* talk.wasm : rename example
This commit is contained in:
Georgi Gerganov
2022-11-21 22:20:42 +02:00
committed by GitHub
parent 2e311a2917
commit a4dfbeecf9
8 changed files with 2083 additions and 3 deletions

View File

@ -2750,7 +2750,7 @@ int whisper_full(
} else {
text += whisper_token_to_str(ctx, tokens_cur[i].id);
}
if (tokens_cur[i].id > whisper_token_beg(ctx)) {
if (tokens_cur[i].id > whisper_token_beg(ctx) && !params.single_segment) {
const auto t1 = seek + 2*(tokens_cur[i].tid - whisper_token_beg(ctx));
if (!text.empty()) {
const auto tt0 = params.speed_up ? 2*t0 : t0;