Python Script Enhancement on Raspberry Pi (Rasp OS improvements)
Budget: €30 – €250 EUR
Hello,
I trust this message finds you well. We have an essential task that requires your expertise in enhancing and adjusting our current system. The task involves several modifications to the existing Python script, improvements to the Rasp OS environment, and the release of an updated Raspian ISO with the implemented features.
Initial Operating Requirements:
Rasp OS environment (latest) with customization (available as an ISO file for download)
Raspberry Pi 4 and 5 hardware
Python scripts utilizing FFMPEG library for recording local audio files and streaming RTP on a specific port
Dropbox upload scripts with hourly scheduling
Configuration file for streaming settings, local/USB storage path, file type, bitrate, Dropbox API access, and scheduler
New Requirements
1) Script Review and RAM Storage:
Modify the Python script to store the audio track in RAM in 60-second blocks (parameter configurable).
Stand-by track should only be stored in RAM, not on the SD card.
When a sound is detected (based on configurable decibel parameters), start writing to SD card or USB pen drive until the end of the noise detection, with a configurable tolerance (e.g., 120 seconds) from the last detection.
If the audio is "listened" again within the tolerance, erase the tolerance timeout and continue with recording on the disk.
2) Multi-Threaded Audio recording Process:
Simultaneously, when audio is off, initiate another recording process in Python (using DEQUEUE library, for example) from the last sound detection, regularly storing in RAM.
3) RTP and Python Script Parallel Execution:
Ensure that RTP is working concurrently with the Python script on different threads/processes.
Configuration option in the CFG file to enable or disable RTP streaming (default is yes).
4) Whisper Audio Analysis:
Analyze the newly recorded audio in the background using Whisper on a dedicated CPU core different from the one handling audio recording.
Send the resulting text file with the same name as the audio file to the designated Dropbox folder.
Rasp OS Improvements:
Install Whisper libraries with porting
(sources https://github.com/AIWintermuteAI/whispercpp, https://github.com/SYSTRAN/faster-whisper, https://gist.github.com/AIWintermuteAI)
Install mlocate, sox, and lame libraries.
Disable specific services (apt-daily-upgrade, apt-daily, modemmanager, bluetooth, etc.).
Swap configuration adjustments.
Request:
Modify the Python script according to the evolving requirements.
Conduct thorough testing.
Release an updated Raspian ISO with the implemented features, pre-tested.
Document the procedures and code.
Payment:
30% upon completion of points 1 and 2 in the "New Requirements" section.
30% upon completion of points 3 and 4 in the "New Requirements" section.
Remaining balance upon delivery of the work and documentation.
Your timely completion of the specified milestones is highly appreciated.
Important Notes:
To avoid any time wastage, we kindly request that only experienced consultants respond:
- Individuals with expertise in Linux, better in Rasp OS
- Good level of Python use and related libraries
- We possess internal development skills, enabling us to assess skill levels quickly.
I trust this message finds you well. We have an essential task that requires your expertise in enhancing and adjusting our current system. The task involves several modifications to the existing Python script, improvements to the Rasp OS environment, and the release of an updated Raspian ISO with the implemented features.
Initial Operating Requirements:
Rasp OS environment (latest) with customization (available as an ISO file for download)
Raspberry Pi 4 and 5 hardware
Python scripts utilizing FFMPEG library for recording local audio files and streaming RTP on a specific port
Dropbox upload scripts with hourly scheduling
Configuration file for streaming settings, local/USB storage path, file type, bitrate, Dropbox API access, and scheduler
New Requirements
1) Script Review and RAM Storage:
Modify the Python script to store the audio track in RAM in 60-second blocks (parameter configurable).
Stand-by track should only be stored in RAM, not on the SD card.
When a sound is detected (based on configurable decibel parameters), start writing to SD card or USB pen drive until the end of the noise detection, with a configurable tolerance (e.g., 120 seconds) from the last detection.
If the audio is "listened" again within the tolerance, erase the tolerance timeout and continue with recording on the disk.
2) Multi-Threaded Audio recording Process:
Simultaneously, when audio is off, initiate another recording process in Python (using DEQUEUE library, for example) from the last sound detection, regularly storing in RAM.
3) RTP and Python Script Parallel Execution:
Ensure that RTP is working concurrently with the Python script on different threads/processes.
Configuration option in the CFG file to enable or disable RTP streaming (default is yes).
4) Whisper Audio Analysis:
Analyze the newly recorded audio in the background using Whisper on a dedicated CPU core different from the one handling audio recording.
Send the resulting text file with the same name as the audio file to the designated Dropbox folder.
Rasp OS Improvements:
Install Whisper libraries with porting
(sources https://github.com/AIWintermuteAI/whispercpp, https://github.com/SYSTRAN/faster-whisper, https://gist.github.com/AIWintermuteAI)
Install mlocate, sox, and lame libraries.
Disable specific services (apt-daily-upgrade, apt-daily, modemmanager, bluetooth, etc.).
Swap configuration adjustments.
Request:
Modify the Python script according to the evolving requirements.
Conduct thorough testing.
Release an updated Raspian ISO with the implemented features, pre-tested.
Document the procedures and code.
Payment:
30% upon completion of points 1 and 2 in the "New Requirements" section.
30% upon completion of points 3 and 4 in the "New Requirements" section.
Remaining balance upon delivery of the work and documentation.
Your timely completion of the specified milestones is highly appreciated.
Important Notes:
To avoid any time wastage, we kindly request that only experienced consultants respond:
- Individuals with expertise in Linux, better in Rasp OS
- Good level of Python use and related libraries
- We possess internal development skills, enabling us to assess skill levels quickly.