radames commited on
Commit
abd0531
1 Parent(s): c4217fa
Files changed (1) hide show
  1. index.html +12 -0
index.html CHANGED
@@ -29,6 +29,12 @@
29
 
30
  <body>
31
  <div id="main-container">
 
 
 
 
 
 
32
  <b>Minimal <a target="_blank" href="https://github.com/ggerganov/whisper.cpp">whisper.cpp</a> example running
33
  fully in the browser</b>
34
 
@@ -198,6 +204,12 @@
198
 
199
  <script type="text/javascript" src="helpers.js"></script>
200
  <script type='text/javascript'>
 
 
 
 
 
 
201
  // TODO: convert audio buffer to WAV
202
  function setAudio(audio) {
203
  //if (audio) {
 
29
 
30
  <body>
31
  <div id="main-container">
32
+ <div id="warning" style="display: none; padding: 1rem;">
33
+ <b style="color: red ; font-size: large;">Warning: your browser does not support SharedArrayBuffer please
34
+ try open the page in a new tab.
35
+ </b> <a href="https://radames-whisper-wasm.hf.space"
36
+ target="_blank">https://radames-whisper-wasm.hf.space</a>
37
+ </div>
38
  <b>Minimal <a target="_blank" href="https://github.com/ggerganov/whisper.cpp">whisper.cpp</a> example running
39
  fully in the browser</b>
40
 
 
204
 
205
  <script type="text/javascript" src="helpers.js"></script>
206
  <script type='text/javascript'>
207
+ document.addEventListener("DOMContentLoaded", () => {
208
+ //check is shared array buffer is supported
209
+ if (!window.SharedArrayBuffer) {
210
+ document.querySelector("#warning").style.display = "block";
211
+ }
212
+ })
213
  // TODO: convert audio buffer to WAV
214
  function setAudio(audio) {
215
  //if (audio) {