Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio processing before upload #507

Open
ab0tj opened this issue Sep 3, 2021 · 2 comments
Open

Audio processing before upload #507

ab0tj opened this issue Sep 3, 2021 · 2 comments

Comments

@ab0tj
Copy link

ab0tj commented Sep 3, 2021

The P25 system that I monitor has quite a wide range of audio levels, ranging from ear splitting to barely audible. I would like to run the .wav files through sox to normalize the audio levels before uploading. I have tried using uploadScript to process the .wav file, but the file that is uploaded to OpenMHz and Broadcastify is always the original (but encoded into AAC) instead of the modified version. Adding the ability to run a script that processes the audio before uploading would be helpful.

@robotastic
Copy link
Owner

That is a pretty good idea - right now it is run as a system command, but it could be a small shell script so people can edit it easier. The command is here: https://github.com/robotastic/trunk-recorder/blob/master/trunk-recorder/uploaders/call_uploader.cc#L20

I may have messed up the command, so let me know if there are better default sox settings.

@ab0tj
Copy link
Author

ab0tj commented Sep 8, 2021

As I understand it, the 'norm' option operates on the peak level of the audio. So in that case a loud "blip" in the signal will cause the rest of the file to have negative gain applied. 'compand' seems to be needed, maybe in conjunction with 'norm'. There's some examples here: https://forum.doom9.org/showthread.php?t=165807

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants