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.md with detailed instructions #1

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
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
63 changes: 54 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
# PercepSync

## Quick Start

Connect a webcam and a microphone to your machine, then download the latest binary from the [Releases page](https://github.com/sled-group/PercepSync/releases) and run it.

```bash
# First make it executable
$ chmod +x PercepSync

# Now, run it!
$ ./PercepSync
```

You can then run the sample Python script to see what's being streamed. Make sure you have access to a display.

```bash
# Install the required packages
$ pip install -r samples/requirements.txt

# Now, run it!
$ python samples/simple_subscriber.py
```

## Switching Input Devices

### Video

By default, `PercepSync` uses `/dev/video0`, but if you want to use another video device, you can pass it in using the `--camera-device-id` option.

```bash
# First find out available video devices.
$ ls -ltrh /dev/video*
crw-rw----+ 1 root video 81, 1 Sep 21 08:50 /dev/video1
crw-rw----+ 1 root video 81, 0 Sep 21 08:50 /dev/video0

# Let's use /dev/video1
$ ./PercepSync --camera-device-id /dev/video1
```

### Audio

By default, `PercepSync` uses `plughw:0,0`, but if you want to use another audio device, you can pass it in using the `--audio-device-name` option.

```bash
$ pacmd list-sources
2 source(s) available.
* index: 1
...truncated
alsa.device = "0"
alsa.card = "2"
...truncated

$ ./PercepSync --audio-device-name plughw:2,0
```

## Development

```bash
Expand All @@ -20,12 +74,3 @@ $ dotnet tool restore
#### Code Formatter

We use [CSharpier](https://csharpier.com/) as our automatic code-formatter. It is automatically run against every commit as part of pre-commit hooks. However, it is highly recommended that you set up your text editor or IDE to run it automatically after each save. For VSCode, you can install the [official extension](https://marketplace.visualstudio.com/items?itemName=csharpier.csharpier-vscode).

## Device Name and IDs

### Video

### Audio

Run `pacmd list-sources` and figure out the following information.
Format = `plughw:<alsa.card>,<alsa.device>`
6 changes: 6 additions & 0 deletions samples/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
msgpack
numpy
opencv-python
Pillow
pyzmq
simpleaudio