From 8767399ce7c3c678f8294c21116b96a506af48cb Mon Sep 17 00:00:00 2001 From: vinay235 Date: Wed, 14 Feb 2024 18:57:33 +0000 Subject: [PATCH] - Emphasizing section titles by making them bold. - Adding instructions to create and activate a virtual environment before installing dependencies. - Correcting the command used to run the script to match the actual script filename (`main.py`). - Updating the help epilog in `main.py` to reflect the correct script name. --- docs/guides/use_python_recorder.md | 15 +++++++++++---- scripts/python_recorder_client/main.py | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/guides/use_python_recorder.md b/docs/guides/use_python_recorder.md index 7f25469..43080b7 100644 --- a/docs/guides/use_python_recorder.md +++ b/docs/guides/use_python_recorder.md @@ -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: @@ -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 @@ -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)). @@ -76,12 +83,12 @@ python main.py --help Run: ```bash -python3 -u -t +python main.py -u -t ``` 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. diff --git a/scripts/python_recorder_client/main.py b/scripts/python_recorder_client/main.py index 1b0f725..eaba25b 100644 --- a/scripts/python_recorder_client/main.py +++ b/scripts/python_recorder_client/main.py @@ -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,