Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README for live captions demo install #71

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ Moonshine ASR models.

- [Moonshine Demos](#moonshine-demos)
- [Demo: Running in the browser](#demo-running-in-the-browser)
- [Installation](#installation)
- [Demo: Live captioning from microphone input](#demo-live-captioning-from-microphone-input)
- [Installation.](#installation)
- [Installation](#installation-1)
- [0. Setup environment](#0-setup-environment)
- [1. Clone the repo and install extra dependencies](#1-clone-the-repo-and-install-extra-dependencies)
- [Ubuntu: Install PortAudio](#ubuntu-install-portaudio)
- [Running the demo](#running-the-demo)
- [Script notes](#script-notes)
- [Speech truncation and hallucination](#speech-truncation-and-hallucination)
Expand Down Expand Up @@ -56,11 +58,12 @@ https://github.com/user-attachments/assets/aa65ef54-d4ac-4d31-864f-222b0e6ccbd3

The [`moonshine-onnx/live_captions.py`](/demo/moonshine-onnx/live_captions.py) script contains a demo of live captioning from microphone input, built on Moonshine. The script runs the Moonshine ONNX model on segments of speech detected in the microphone signal using a voice activity detector called [`silero-vad`](https://github.com/snakers4/silero-vad). The script prints scrolling text or "live captions" assembled from the model predictions to the console.

The following steps have been tested in a `uv` (v0.4.25) virtual environment on these platforms:
The following steps have been tested in `uv` virtual environments on these platforms:

- macOS 14.1 on a MacBook Pro M3
- Ubuntu 22.04 VM on a MacBook Pro M2
- Ubuntu 24.04 VM on a MacBook Pro M2
- Debian 12.8 (64-bit) on a Raspberry Pi 5 (Model B Rev 1.0)

## Installation

Expand All @@ -76,9 +79,12 @@ You will need to clone the repo first:
git clone [email protected]:usefulsensors/moonshine.git
```

Then install the demo's requirements:
Then install the demo's requirements including mitigation for a failure to build
and install `llvmlite` without `numba` package:

```shell
uv pip install numba

uv pip install -r moonshine/demo/moonshine-onnx/requirements.txt
```

Expand Down
Loading