Update README.md and finalize the whisper.wasm example

This commit is contained in:
Georgi Gerganov
2022-10-22 18:17:08 +03:00
parent 491ecd7056
commit 6b45e37b2b
7 changed files with 39 additions and 6 deletions

View File

@@ -162,7 +162,7 @@
</tr>
</table>
<br><br>
<br>
<!-- textarea with height filling the rest of the page -->
<textarea id="output" rows="20"></textarea>
@@ -254,6 +254,10 @@
return new type(buffer);
}
//
// load model
//
function loadFile(event, fname) {
var file = event.target.files[0] || null;
if (file == null) {
@@ -281,6 +285,10 @@
reader.readAsArrayBuffer(file);
}
//
// audio file
//
function loadAudio(event) {
if (!context) {
context = new AudioContext({sampleRate: 16000});
@@ -327,7 +335,7 @@
}
//
// Microphone
// microphone
//
var mediaRecorder = null;