diff --git a/src/app.py b/src/app.py index 91501d1..9bd8fd3 100644 --- a/src/app.py +++ b/src/app.py @@ -2,7 +2,7 @@ import logging import sentry_sdk from sentry_sdk.integrations.logging import LoggingIntegration -import config +from utils import config """ Main Entrypoint diff --git a/src/preprocessor/__init__.py b/src/preprocessor/__init__.py index e69de29..b40b2c2 100644 --- a/src/preprocessor/__init__.py +++ b/src/preprocessor/__init__.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +from .soundpreprocessor import SoundPreProcessor diff --git a/src/preprocessor/soundpreprocessor.py b/src/preprocessor/soundpreprocessor.py new file mode 100644 index 0000000..b86b9aa --- /dev/null +++ b/src/preprocessor/soundpreprocessor.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +from .abcpreprocessor import AbcPreProcessor + +""" +Abstract base class for Sender +""" + +__author__ = "@tormakris" +__copyright__ = "Copyright 2020, Birbnetes Team" +__module_name__ = "soundpreprocessor" +__version__text__ = "1" + + +class SoundPreProcessor(AbcPreProcessor): + """ + SoundPreProcessor class, responsible for detecting birb chirps in sound sample. + """ + def preprocesssignal(self, signal): + """ + Classify a sound sample. + :return: + """ + pass diff --git a/src/sender/__init__.py b/src/sender/__init__.py index e69de29..ce90cee 100644 --- a/src/sender/__init__.py +++ b/src/sender/__init__.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +from .soundsender import SoundSender diff --git a/src/sender/soundsender.py b/src/sender/soundsender.py new file mode 100644 index 0000000..b627372 --- /dev/null +++ b/src/sender/soundsender.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +from .abcsender import AbcSender + +""" +Send a sound sample +""" + +__author__ = "@tormakris" +__copyright__ = "Copyright 2020, Birbnetes Team" +__module_name__ = "soundsender" +__version__text__ = "1" + + +class SoundSender(AbcSender): + """ + SoundSender class, responsible for sending sound samples to the cloud. + """ + def sendvalue(self, value, decision): + """ + Send a sound sample to the cloud. + :return: + """ + pass diff --git a/src/sensor/__init__.py b/src/sensor/__init__.py index e69de29..3b0492f 100644 --- a/src/sensor/__init__.py +++ b/src/sensor/__init__.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +from .soundsensor import SoundSensor diff --git a/src/sensor/soundsensor.py b/src/sensor/soundsensor.py new file mode 100644 index 0000000..3765b21 --- /dev/null +++ b/src/sensor/soundsensor.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +from .abcsensor import AbcSensor + +""" +Sound sensor high level API +""" + +__author__ = "@tormakris" +__copyright__ = "Copyright 2020, Birbnetes Team" +__module_name__ = "soundsensor" +__version__text__ = "1" + + +class SoundSensor(AbcSensor): + """ + SoundSensor class. Responsible for sound retrieval from any microphones present. + """ + def getvalue(self): + """ + Retrieve a 5 second sound clip from a microphone. + :return: + """ + pass diff --git a/src/signal_processor/__init__.py b/src/signal_processor/__init__.py index e69de29..519b014 100644 --- a/src/signal_processor/__init__.py +++ b/src/signal_processor/__init__.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +from .soundsignalprocessor import SoundSignalProcessor diff --git a/src/signal_processor/soundsignalprocessor.py b/src/signal_processor/soundsignalprocessor.py new file mode 100644 index 0000000..4f18a2a --- /dev/null +++ b/src/signal_processor/soundsignalprocessor.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +from .abcsignalprocessor import AbcSignalProcessor + +""" +Abstract base class for signalprocessor +""" + +__author__ = "@tormakris" +__copyright__ = "Copyright 2020, Birbnetes Team" +__module_name__ = "soundsignalprocessor" +__version__text__ = "1" + + +class SoundSignalProcessor(AbcSignalProcessor): + """ + SoundSignalProcessor class, responsible for handling the sound signal processor pipeline. + """ + def processcurrentsignal(self): + """ + Process a sound sample. + :return: + """ + pass diff --git a/src/utils/__init__.py b/src/utils/__init__.py new file mode 100644 index 0000000..9d7d137 --- /dev/null +++ b/src/utils/__init__.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +from .config import SENTRY_DSN, RELEASE_ID, RELEASEMODE diff --git a/src/config.py b/src/utils/config.py similarity index 100% rename from src/config.py rename to src/utils/config.py