Skip to content

Commit

Permalink
Merge pull request #51 from vinay235/python-rec-local
Browse files Browse the repository at this point in the history
Python local recorder app and docs cleanup
  • Loading branch information
adamcohenhillel committed Feb 14, 2024
2 parents 9f8c6f8 + 8767399 commit 9c313da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions docs/guides/use_python_recorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ parent: How to Guides
---
Sometimes, when working on the frontend / backend of Adeus, you want an easier and faster feedback loop, one that does not require the use of the physical device. This is exactly what this guide is about.

#### Setup:
#### **Setup**:

first, let's go to the script's folder:

Expand All @@ -28,6 +28,13 @@ cd scripts/python_recorder_client
And now let's install it's requirements.
The script requires PyAudio to capture audio from your microphone, which has different setup to each OS:

Optional : Create a venv and activate before installing pip packages.

```bash
python -m venv venv
source venv/bin/activate
```

**Windows**

```bash
Expand All @@ -52,7 +59,7 @@ Now, we can install the rest of the requirements:
pip install -r requirements.txt
```

#### Run the script
#### **Run the script**

To run the script, you need to provide the --base-url (-u) and --token (-t) parameters, these are your Supabase (if you don't have these parameters, please go to the [setup tutorial](./index)).

Expand All @@ -76,12 +83,12 @@ python main.py --help
Run:

```bash
python3 -u <SUPABASE_URL> -t <SUPABASE_TOKEN>
python main.py -u <SUPABASE_URL> -t <SUPABASE_TOKEN>
```

And that is it, you should now be able to record things locally, and test the frontend / backend without a physical device!

#### Important Notes
#### **Important Notes**

- Ensure your base_url and token are correct to successfully send recordings.
- Adjust the sensitivity to your microphone setup to avoid missing recordings or record silance.
Expand Down
2 changes: 1 addition & 1 deletion scripts/python_recorder_client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

parser = argparse.ArgumentParser(
description='Record audio and send it to a server.',
epilog='python recorder.py -s 60 -m 50.0 -u "https://{YOUR_ID}.supabase.co" -t "API_TOKEN" -r -v'
epilog='python main.py -s 60 -m 50.0 -u "https://{YOUR_ID}.supabase.co" -t "API_TOKEN" -r -v'
)

parser.add_argument('-u', '--base-url', type=str, required=True,
Expand Down

0 comments on commit 9c313da

Please sign in to comment.