Luigi commited on
Commit
baa2717
·
1 Parent(s): 7d4a05c

show detected sample rate

Browse files
Files changed (1) hide show
  1. app/static/index.html +4 -0
app/static/index.html CHANGED
@@ -171,6 +171,7 @@
171
  const precisionSelect = document.getElementById("precisionSelect");
172
  const modelLangs = document.getElementById("modelLangs");
173
  const modelSize = document.getElementById("modelSize");
 
174
 
175
  function updateModelInfo() {
176
  const meta = MODEL_METADATA[modelSelect.value];
@@ -198,6 +199,9 @@
198
  navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => {
199
  const context = new AudioContext();
200
  orig_sample_rate = context.sampleRate;
 
 
 
201
  updateModelInfo();
202
 
203
  // Now that we know the sample rate, open the WS
 
171
  const precisionSelect = document.getElementById("precisionSelect");
172
  const modelLangs = document.getElementById("modelLangs");
173
  const modelSize = document.getElementById("modelSize");
174
+ const sampleRateElem = document.getElementById("sampleRate");
175
 
176
  function updateModelInfo() {
177
  const meta = MODEL_METADATA[modelSelect.value];
 
199
  navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => {
200
  const context = new AudioContext();
201
  orig_sample_rate = context.sampleRate;
202
+ console.debug("Detected sample rate:", orig_sample_rate);
203
+ sampleRateElem.textContent = orig_sample_rate;
204
+
205
  updateModelInfo();
206
 
207
  // Now that we know the sample rate, open the WS