This project is designed to be used in police and fire departments to help them manage their transmissions on radios and access every message that an unit sends out. It uses a python script that continuously listens to an audio source and records any transmission that comes through to help departments keep track of communications on specific channels. The designed AWS pipeline will store all transmissions in AWS S3 buckets and log data into a RDS database. The scheduling feature means that it can always run on any computer without need for user input and will automatically update AWS.
- Clone repo. Use a GH client or just press the green button, download the ZIP, and unzip it.
- Make sure you have Python 3 installed to your computer
- Install all necessary dependencies by running pip install pyaudio, pip install math, pip install struct, pip install wave, pip install time, pip install os. If pyaudio is giving you trouble, try this: run pip install pipwin and then run pipwin install pyaudio
- Go to the folder with pythonrecorder and modify the directory variable to the place where you want audio files to be stored. I recommend just making a directory folder within pythonrecorder like I did.
- run python main.py in terminal.
- The script is now listening. Please play some form of audio to the microphone to test it.
- Pro tip: modify the maxSoundVal variable if you want your minimum sound threshold to be higher or lower. The higher it is, the more nuianced the script be in identifying your sound. If your sound is going to be loud, you can increase the variable to the hundreds for your desired value.
python main.py -f'your desired filename'
To prevent constant rewriting of the same name, a mechanism was implemented to append UNIX date time to filename. If this feature is not wanted, please remove this line: shfile_name = file_name + str(int(time.time()))
If filename is not provided, it will default to UNIX date time.
python main.py -f'your desired path'
If filename is not provided, it will default to /tmp