diff --git a/moonshine/demo/README.md b/moonshine/demo/README.md index b2c45fe..13a0618 100644 --- a/moonshine/demo/README.md +++ b/moonshine/demo/README.md @@ -160,20 +160,20 @@ for a value of 0.2 seconds. ```console (env_moonshine_faster_whisper) parallels@ubuntu-linux-2404:~$ python3 moonshine/moonshine/demo/live_captions.py Error in cpuinfo: prctl(PR_SVE_GET_VL) failed -Loading Faster-Whisper int8 base.en model ... +Loading Faster-Whisper float32 base.en model ... Press Ctrl+C to quit live captions. -sper int8 base model being used to generate captions while someone is speaking. ^C +r float32 base model being used to generate captions while someone is speaking. ^C model_size : base.en - MIN_REFRESH_SECS : 1.0s + MIN_REFRESH_SECS : 1.2s - number inferences : 7 - mean inference time : 0.86s - model realtime factor : 5.77x + number inferences : 6 + mean inference time : 1.02s + model realtime factor : 4.82x Cached captions. -This is an example of the faster whisper int8 base model being used to generate captions while someone is speaking. +This is an example of the Faster Whisper float32 base model being used to generate captions while someone is speaking. (env_moonshine_faster_whisper) parallels@ubuntu-linux-2404:~$ ``` diff --git a/moonshine/demo/live_captions.py b/moonshine/demo/live_captions.py index 6735ff4..49afa7a 100644 --- a/moonshine/demo/live_captions.py +++ b/moonshine/demo/live_captions.py @@ -24,7 +24,6 @@ LOOKBACK_CHUNKS = 5 MARKER_LENGTH = 6 MAX_LINE_LENGTH = 80 -SHOW_NEW_CAPTION = False # Stacks cached captions above scrolling captions. # These affect live caption updating - adjust for your platform speed and model. MAX_SPEECH_SECS = 15 @@ -83,9 +82,6 @@ def end_recording(speech, marker=""): def print_captions(text, new_cached_caption=False): """Prints right justified on same line, prepending cached captions.""" print('\r' + " " * MAX_LINE_LENGTH, end='', flush=True) - if SHOW_NEW_CAPTION and new_cached_caption: - print('\r', end='', flush=True) - print(caption_cache[-1][:-MARKER_LENGTH]) if len(text) > MAX_LINE_LENGTH: text = text[-MAX_LINE_LENGTH:] elif text != "\n":