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

Improve robustness of analysis #8

Open
amotl opened this issue Feb 10, 2022 · 2 comments
Open

Improve robustness of analysis #8

amotl opened this issue Feb 10, 2022 · 2 comments

Comments

@amotl
Copy link
Member

amotl commented Feb 10, 2022

Hi again,

@insipiens shared some promising news with us at 1, where he outlined how to get more sane results after applying a filter curve EQ and normalizing the audio file beforehand -- thanks!

The procedure is currently based on Audacity - it would be sweet if we could integrate it into the repository in one way or another.

With kind regards,
Andreas.

Footnotes

  1. https://community.hiveeyes.org/t/docker-container-for-audiohealth/4402/6

@insipiens
Copy link

insipiens commented Feb 10, 2022

I've made the version of audiohealth for docker public on my github repo public:

docker_audiohealth

Note it now has no pre-processing transforms via sox, I have recompiled the OSBH engine to 8k sample rate. I'm assuming the parameter for sample rate is provided for that reason(?)

I use inotifywait on the server side to call docker_healthaudio to process the incoming wav file.

I apply sox transforms to the input file prior to passing it to docker_audiohealth while testing.

inotify script:

#!/bin/bash
TARGET=/myftpdirectory
PROCESSED=/myprocessedaudiofiles

inotifywait -m -e create -e CLOSE_WRITE --format "%f" $TARGET \
        | while read FILENAME
                do
                        echo Detected new file $FILENAME
                        sleep 60   #delay in case of multiple ftp writes
                        echo moving $FILENAME to processed and running audiohealth
                        cp "$TARGET/$FILENAME" "$PROCESSED/rha_$FILENAME"
                        sleep 5
                        echo PreProcessing $FILENAME
                        sox "$PROCESSED/rha_$FILENAME" "$PROCESSED/$FILENAME" -S bass +6 50  0.5s #apply transform to received wav file prior to audiohealth
                        echo Processed $FILENAME
                        sleep 5
                        docker exec audiohealth python audiohealth.py analyze --audiofile ./samples/"$FILENAME" --analyzer tools/osbh-audioanalyzer/bin/test
                done

@amotl
Copy link
Member Author

amotl commented Feb 10, 2022

Dear John,

that looks excellent. Thank you very much for sharing your improvements. I will look into how to integrate them back into the main repository, if I can find some time.

With kind regards,
Andreas.

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

No branches or pull requests

2 participants