Skip to content

Commit

Permalink
Merge pull request #1 from sled-group/update-readme
Browse files Browse the repository at this point in the history
Update README.md with detailed instructions
  • Loading branch information
yukw777 authored Sep 21, 2023
2 parents 99b6562 + 07ca746 commit bae2b28
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 9 deletions.
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

0 comments on commit bae2b28

Please sign in to comment.