Skip to content

Commit

Permalink
docs and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-balke committed May 8, 2019
1 parent e116008 commit a726891
Show file tree
Hide file tree
Showing 119 changed files with 2,692 additions and 11,725 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,31 @@ This project provides components for predicting audio input and showing its corr
     directory with a sample python GUI

## Installation

### Backend
Use Python 3 and Anaconda in order to get the code running for guarantee!
Version used during development: ```3.6.7```

1. ```python setup.py develop```
2. Execute conda environment.yaml with ```conda env create -f environment.yml```
1. Create environment ```conda env create -f environment.yml```
1. Install package ```python setup.py develop```

### GUI
We provide a simple GUI written in Kivy. To fullfil the requirements on Ubuntu, please install these packages.

```
sudo apt-get install -y \
build-essential \
git \
libsdl2-dev \
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libportmidi-dev \
libswscale-dev \
libavformat-dev \
libavcodec-dev \
zlib1g-dev
```

## Architectural backend design
The figure below should give a basic understanding of the information flow and the components involved in
Expand All @@ -37,8 +57,6 @@ python server/webserver.py
### REST interface
In order to guarantee independence of programming languages, all output can be accessed by calling URL endpoints.



#### Get current spectrogram
| | |
| ----------- | --------- |
Expand Down Expand Up @@ -87,6 +105,7 @@ Example response: ```[{"id": 0, "displayname": "Trumpets"}, {"id": 1, "displayna
| Return | the available prediction models as a list of json objects |

Example response: ```[{"id": 0, "displayname": "DCASEPredictor", "classes": "41", "description": "sample description for dcase"}, {"id": 1, "displayname": "SportsPredictor", "classes": "3", "description": "sample description for detecting sports"}, ...]```

#### Change audio input source and predictor
The audio tagger backend implements another endpoint to change the audio source as well as the currently active prediction model on the fly.

Expand Down
6 changes: 0 additions & 6 deletions __init__.py

This file was deleted.

19 changes: 19 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_build/doctrees/backend.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/consumer.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/webserver.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/html/.buildinfo → docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 0e0ba0e032550f0328d7183ad5e743b8
config: bc98726097488efc54704977655c58bd
tags: 645f666f9bcd5a90fca523b33c5a78b7
8 changes: 8 additions & 0 deletions docs/_build/html/_sources/backend.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Backend
=======

.. toctree::
:maxdepth: 1

consumer
webserver
16 changes: 16 additions & 0 deletions docs/_build/html/_sources/consumer.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Consumer
========

.. automodule:: server.consumer

Example Predictor
-----------------

.. automodule:: server.consumer.predictors.example_predictor.dummy_predictor
:members:

DCASE Predictor
---------------

.. automodule:: server.consumer.predictors.dcase_predictor_provider.dcase_predictor_provider
:members:
30 changes: 30 additions & 0 deletions docs/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Audio-Tagger
============

The Audio-Tagger is designed as a general-purpose tool to make predictions
along with visualizations on live-audio input.
For example, we provide a DNN-based audio scene classification predictor
based on 2018's DCASE-challenge.

The system is designed as a server-client architecture.
The server is responsible for all audio IO and for performing predictions.
The audio input can either come from a WAV-file or from live microphone input.
The client can control the server and receive the predictions
through a simple REST-API.
We provide an exemplary GUI written in Kivy along with this project.
Please follow the README to setup the required Python environments.

Modules
=======

.. toctree::
:maxdepth: 3

backend

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
6 changes: 6 additions & 0 deletions docs/_build/html/_sources/webserver.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Webserver
=========
.. _webserver:

.. automodule:: server.webserver
:members:
Loading

0 comments on commit a726891

Please sign in to comment.