sdelangen commited on
Commit
b40c540
1 Parent(s): aef3c9c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -4
README.md CHANGED
@@ -171,9 +171,12 @@ for text_chunk in asr.transcribe_file_streaming(args.audio_path, config):
171
 
172
  We want to optimize some things around the model before we create a proper HuggingFace space demonstrating live streaming on CPU.
173
 
174
- In the mean time, this is a simple hacky demo of live ASR in the browser using Gradio's live microphone streaming feature.
175
- If you run this, please note that browsers may refuse to stream audio from an insecure connection, unless it is localhost.
176
- If you are running this on a remote server, you could use SSH port forwarding to expose the remote's port on your machine.
 
 
 
177
 
178
  Run using:
179
 
@@ -236,7 +239,7 @@ def transcribe(stream, new_chunk):
236
  # HACK: we are making poor use of the resampler across chunk boundaries
237
  # which may degrade accuracy.
238
  # NOTE: we should also absolutely avoid recreating a resampler every time
239
- resampler = torchaudio.transforms.Resample(orig_freq=sr, new_freq=asr.audio_normalizer.sample_rate)
240
  y = resampler(y) # janky resample (probably to 16kHz)
241
 
242
 
 
171
 
172
  We want to optimize some things around the model before we create a proper HuggingFace space demonstrating live streaming on CPU.
173
 
174
+ In the mean time, this is a simple hacky demo of live ASR in the browser using Gradio's live microphone streaming feature.
175
+
176
+ If you run this, please note:
177
+
178
+ - Modern browsers refuse to stream microphone input over an untrusted connection (plain HTTP), unless it is localhost. If you are running this on a remote server, you could use SSH port forwarding to expose the remote's port on your machine.
179
+ - Streaming using Gradio on Firefox seems to cause some issues. Chromium-based browsers seem to behave better.
180
 
181
  Run using:
182
 
 
239
  # HACK: we are making poor use of the resampler across chunk boundaries
240
  # which may degrade accuracy.
241
  # NOTE: we should also absolutely avoid recreating a resampler every time
242
+ resampler = torchaudio.transforms.Resample(orig_freq=sr, new_freq=asr.audio_normalizer.sample_rate).to(device)
243
  y = resampler(y) # janky resample (probably to 16kHz)
244
 
245