Spaces:
Running
Running
minor : updates few prints + fix buttons in whisper.wasm
Browse files- examples/whisper.wasm/index-tmpl.html +5 -0
- whisper.cpp +2 -2
examples/whisper.wasm/index-tmpl.html
CHANGED
|
@@ -297,6 +297,11 @@
|
|
| 297 |
storeFS(fname, buf);
|
| 298 |
}
|
| 299 |
reader.readAsArrayBuffer(file);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
}
|
| 301 |
|
| 302 |
// fetch a remote file from remote URL using the Fetch API
|
|
|
|
| 297 |
storeFS(fname, buf);
|
| 298 |
}
|
| 299 |
reader.readAsArrayBuffer(file);
|
| 300 |
+
|
| 301 |
+
document.getElementById('fetch-whisper-tiny-en').style.display = 'none';
|
| 302 |
+
document.getElementById('fetch-whisper-base-en').style.display = 'none';
|
| 303 |
+
document.getElementById('fetch-whisper-tiny').style.display = 'none';
|
| 304 |
+
document.getElementById('fetch-whisper-base').style.display = 'none';
|
| 305 |
}
|
| 306 |
|
| 307 |
// fetch a remote file from remote URL using the Fetch API
|
whisper.cpp
CHANGED
|
@@ -1042,7 +1042,7 @@ static bool whisper_model_load(const std::string & fname, whisper_context & wctx
|
|
| 1042 |
|
| 1043 |
fin.read(reinterpret_cast<char *>(tensor->data), ggml_nbytes(tensor));
|
| 1044 |
|
| 1045 |
-
//printf("%
|
| 1046 |
total_size += ggml_nbytes(tensor);
|
| 1047 |
model.n_loaded++;
|
| 1048 |
}
|
|
@@ -2708,7 +2708,7 @@ int whisper_full(
|
|
| 2708 |
|
| 2709 |
//{
|
| 2710 |
// const auto tt = token.pt > 0.10 ? ctx->vocab.id_to_token[token.tid] : "[?]";
|
| 2711 |
-
// printf("%s: %10s %6.3f '%s'\n", __func__, tt.c_str(), token.pt, ctx->vocab.id_to_token[token.id].c_str());
|
| 2712 |
//}
|
| 2713 |
|
| 2714 |
// end of text token
|
|
|
|
| 1042 |
|
| 1043 |
fin.read(reinterpret_cast<char *>(tensor->data), ggml_nbytes(tensor));
|
| 1044 |
|
| 1045 |
+
//printf("%48s - [%5d, %5d, %5d], type = %6s, %6.2f MB\n", name.data(), ne[0], ne[1], ne[2], ftype == 0 ? "float" : "f16", ggml_nbytes(tensor)/1024.0/1024.0);
|
| 1046 |
total_size += ggml_nbytes(tensor);
|
| 1047 |
model.n_loaded++;
|
| 1048 |
}
|
|
|
|
| 2708 |
|
| 2709 |
//{
|
| 2710 |
// const auto tt = token.pt > 0.10 ? ctx->vocab.id_to_token[token.tid] : "[?]";
|
| 2711 |
+
// printf("%s: %10s %6d %6.3f '%s'\n", __func__, tt.c_str(), token.id, token.pt, ctx->vocab.id_to_token[token.id].c_str());
|
| 2712 |
//}
|
| 2713 |
|
| 2714 |
// end of text token
|