├── .codecov.yml
├── .coveragerc
├── .coveralls.yml
├── .gitignore
├── .readthedocs.yml
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── appveyor.yml
├── docs
├── Makefile
├── icon.png
├── make.bat
├── requirements.txt
└── source
│ ├── _static
│ ├── creativecommons.png
│ ├── css
│ │ └── custom.css
│ ├── favicon_io
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-512x512.png
│ │ ├── apple-touch-icon.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon.ico
│ │ └── site.webmanifest
│ ├── logo.png
│ └── logo1.png
│ ├── _templates
│ ├── footer.html
│ ├── hello.html
│ ├── layout.html
│ ├── navbar-nav.html
│ ├── navbar_version.html
│ └── sidebar-nav-bs.html
│ ├── auga.rst
│ ├── augf.rst
│ ├── augt.rst
│ ├── code.rst
│ ├── conf.py
│ ├── filters.rst
│ ├── index.rst
│ └── io.rst
├── language.json
├── paper
├── Makefile
├── README.md
├── assets
│ ├── apa.csl
│ ├── latex.template
│ └── logo.png
├── experiment
│ ├── README.md
│ ├── _1_get_data.py
│ ├── _2_gen_augmentations.py
│ ├── _3_get_features.py
│ ├── _4_run_experiment.py
│ ├── results.txt
│ ├── sounds
│ │ ├── ir_classroom.wav
│ │ ├── ir_smartphone_mic.wav
│ │ ├── tel_noise.wav
│ │ └── white_noise.wav
│ └── utils
│ │ ├── classifiers_config.py
│ │ ├── cmat.py
│ │ └── dataproc.py
├── figs
│ ├── bpass.png
│ ├── hpass.png
│ └── lpass.png
├── paper.bib
├── paper.md
├── paper.pdf
└── refs.md
├── pydiogment
├── __init__.py
├── auga.py
├── augf.py
├── augt.py
└── utils
│ ├── __init__.py
│ ├── filters.py
│ └── io.py
├── requirements.txt
├── setup.cfg
├── setup.py
└── tests
├── __init__.py
├── test_auga.py
├── test_augf.py
├── test_augt.py
├── test_utils.py
└── testfiles
├── tel_noise.wav
├── test.wav
├── test_augmented_-100_noisy.wav
├── test_augmented_-20_noisy.wav
├── test_augmented_-3_noisy.wav
├── test_augmented_-50_noisy.wav
├── test_augmented_-6_noisy.wav
├── test_augmented_0.9_pass_filtered.wav
├── test_augmented_0.9_toned.wav
├── test_augmented_1.1_pass_filtered.wav
├── test_augmented_1.1_toned.wav
├── test_augmented_fade_in_out.wav
├── test_augmented_left_1_shifted.wav
├── test_augmented_peak_normalized.wav
├── test_augmented_randomly_cropped_1.wav
├── test_augmented_resampled_to_16000.wav
├── test_augmented_resampled_to_4000.wav
├── test_augmented_resampled_to_6000.wav
├── test_augmented_resampled_to_9000.wav
├── test_augmented_reversed.wav
├── test_augmented_right_1_shifted.wav
├── test_augmented_rms_normalized.wav
├── test_augmented_slowed.wav
├── test_augmented_speeded.wav
├── test_augmented_tel_noise_convolved_with_level_0.01.wav
├── test_augmented_tel_noise_convolved_with_level_0.25.wav
├── test_augmented_tel_noise_convolved_with_level_0.5.wav
├── test_augmented_with_-100_gain.wav
├── test_augmented_with_-25_gain.wav
├── test_augmented_with_-50_gain.wav
└── test_augmented_without_silence.wav
/.codecov.yml:
--------------------------------------------------------------------------------
1 | codecov:
2 | notify:
3 | require_ci_to_pass: yes
4 | bot: Pydiogment-codecov-bot
5 |
6 | coverage:
7 | precision: 2
8 | round: down
9 | range: "70...100"
10 |
11 | status:
12 | project: yes
13 | patch: yes
14 | changes: no
15 |
16 | parsers:
17 | gcov:
18 | branch_detection:
19 | conditional: yes
20 | loop: yes
21 | method: no
22 | macro: no
23 |
24 | comment:
25 | layout: "header, diff"
26 | behavior: default
27 | require_changes: no
28 |
29 | ignore:
30 | - "setup.py"
31 | - "**/*.md"
32 |
--------------------------------------------------------------------------------
/.coveragerc:
--------------------------------------------------------------------------------
1 | # .coveragerc
2 | [report]
3 | show_missing = True
4 | omit =
5 | paper/*
6 | setup.py
7 | *.md
8 |
--------------------------------------------------------------------------------
/.coveralls.yml:
--------------------------------------------------------------------------------
1 | service_name: travis-pro
2 | repo_token: SpTvumnGHOE9XKc5K9waBJ1NprJ6iiBRM
3 | parallel: true # if the CI is running your build in parallel
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 | MANIFEST
27 | .pypirc
28 |
29 | # PyInstaller
30 | # Usually these files are written by a python script from a template
31 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
32 | *.manifest
33 | *.spec
34 |
35 | # Installer logs
36 | pip-log.txt
37 | pip-delete-this-directory.txt
38 |
39 | # Unit test / coverage reports
40 | htmlcov/
41 | .tox/
42 | .coverage
43 | .coverage.*
44 | .cache
45 | nosetests.xml
46 | coverage.xml
47 | *.cover
48 | .hypothesis/
49 | .pytest_cache/
50 |
51 | # Translations
52 | *.mo
53 | *.pot
54 |
55 | # Django stuff:
56 | *.log
57 | local_settings.py
58 | db.sqlite3
59 |
60 | # Flask stuff:
61 | instance/
62 | .webassets-cache
63 |
64 | # Scrapy stuff:
65 | .scrapy
66 |
67 | # Sphinx documentation
68 | docs/_build/
69 |
70 | # PyBuilder
71 | target/
72 |
73 | # Jupyter Notebook
74 | .ipynb_checkpoints
75 |
76 | # pyenv
77 | .python-version
78 |
79 | # celery beat schedule file
80 | celerybeat-schedule
81 |
82 | # SageMath parsed files
83 | *.sage.py
84 |
85 | # Environments
86 | .env
87 | .venv
88 | env/
89 | venv/
90 | ENV/
91 | env.bak/
92 | venv.bak/
93 |
94 | # Spyder project settings
95 | .spyderproject
96 | .spyproject
97 |
98 | # Rope project settings
99 | .ropeproject
100 |
101 | # mkdocs documentation
102 | /site
103 |
104 | # mypy
105 | .mypy_cache/
106 |
107 |
108 | # models
109 | paper/experiment/models
110 | paper/experiment/data
111 |
--------------------------------------------------------------------------------
/.readthedocs.yml:
--------------------------------------------------------------------------------
1 | # Read the Docs configuration file
2 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3 |
4 | # Required
5 | version: 2
6 |
7 | # Build documentation in the docs/ directory with Sphinx
8 | sphinx:
9 | configuration: docs/source/conf.py
10 |
11 | python:
12 | version: 3.6
13 | install:
14 | - requirements: docs/requirements.txt
15 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: python
2 | python:
3 | - "3.5"
4 | - "3.6"
5 | - "3.7"
6 |
7 | cache:
8 | - pip
9 |
10 | # command to install dependencies
11 | before_script:
12 | - sudo apt-get update
13 | - sudo apt-get install python3
14 | - sudo apt-get install python3-pip
15 | - sudo apt-get install python3-setuptools
16 | - pip3 install --upgrade setuptools
17 | - pip3 install pytest
18 | - pip3 install pytest-cov pytest
19 | - pip3 install codecov
20 | - pip3 install coveralls
21 | - pip3 install pytest-xdist
22 | - pip3 install codacy-coverage
23 | - sudo apt-get update
24 | - pip3 install matplotlib
25 | - pip3 install -r requirements.txt
26 | - sudo apt install ffmpeg
27 |
28 | # command to run tests
29 | script:
30 | - pytest --cache-clear -n 8 -q --cov=./ || --force-yes
31 |
32 | after_success:
33 | - codecov
34 | - coveralls
35 | - coverage xml
36 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language.
18 | * Being respectful of differing viewpoints and experiences.
19 | * Gracefully accepting constructive criticism.
20 | * Focusing on what is best for the community.
21 | * Showing empathy towards other community members.
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances.
27 | * Trolling, insulting/derogatory comments, and personal or political attacks.
28 | * Public or private harassment.
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission.
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting.
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at superkogito@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, please refer to this [link](https://www.contributor-covenant.org/faq).
76 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing guidelines
2 | =======================
3 |
4 | How to contribute
5 | -----------------
6 |
7 | The preferred way to contribute to pydiogment is to fork the [main repository](https://github.com/SuperKogito/pydiogment) on GitHub:
8 |
9 | 1. Fork the [project repository](https://github.com/SuperKogito/pydiogment): click on the 'Fork' button near the top of the page. This creates a copy of the code under your account on the GitHub server.
10 |
11 | 2. Clone this copy to your local disk:
12 |
13 | - Using SSH:
14 |
15 | ```bash
16 | git clone git@github.com:YourLogin/pydiogment.git
17 | cd pydiogment
18 | ```
19 |
20 | - Using HTTPS:
21 |
22 | ```bash
23 | git clone https://github.com/YourLogin/pydiogment.git
24 | cd pydiogment
25 | ```
26 |
27 | 3. Remove any previously installed pydiogment versions, then install your local copy with testing dependencies:
28 |
29 | ```bash
30 | pip uninstall pydiogment
31 | pip install .
32 | ```
33 |
34 | 4. Create a branch to hold your changes:
35 |
36 | ```bash
37 | git checkout -b my-feature
38 | ```
39 |
40 | 5. Start making changes
41 |
42 | - Please never work directly on the `master` branch!
43 |
44 | 6. Use Git for the to do the version controlling of this copy. When you're done editing, you know the drill `add`, `commit` then `push`:
45 |
46 | ```bash
47 | git add modified_files
48 | git commit
49 | ```
50 |
51 | to record your changes in Git, push them to GitHub with:
52 |
53 | ```bash
54 | git push -u origin my-feature
55 | ```
56 |
57 | 7. Finally, go to the web page of the your pydiogment fork repo, and click 'Pull request' button to send your changes to the maintainers for review.
58 |
59 | Remarks
60 | -------
61 |
62 | It is recommended to check that your contribution complies with the following rules before submitting a pull request:
63 |
64 | - All public methods should have informative docstrings with sample usage presented.
65 |
66 | You can also check for common programming errors with the following tools:
67 |
68 | - Code with good test coverage (at least 80%), check with:
69 |
70 | ```bash
71 | pytest
72 | ```
73 |
74 | - No pyflakes warnings, check with:
75 |
76 | ```bash
77 | pip install pyflakes
78 | pyflakes path/to/module.py
79 | ```
80 |
81 | - No PEP8 warnings, check with:
82 |
83 | ```bash
84 | pip install pycodestyle
85 | pycodestyle path/to/module.py
86 | ```
87 |
88 | - AutoPEP8 and yapf can help you fix some of the easy redundant errors and linter your code:
89 |
90 | ```bash
91 | pip install autopep8
92 | pip install yapf
93 |
94 |
95 | autopep8 path/to/module.py
96 | yapf path/to/module.py
97 | ```
98 |
99 | Filing bugs
100 | -----------
101 |
102 | we use Github issues to track all bugs and feature requests. In the case of coming across a bug, having a question or a feature suggestion etc. please feel free to open an issue. However, please make sure that your issue comply with our rules/follows the provided templates:
103 |
104 | - [bug reports template](https://github.com/SuperKogito/pydiogment/blob/master/.github/ISSUE_TEMPLATE/bug_report.md)
105 |
106 | - [feature requests template](https://github.com/SuperKogito/pydiogment/blob/master/.github/ISSUE_TEMPLATE/feature_request.md)
107 |
108 | In addition, please check that your issue complies with the following rules before submitting:
109 |
110 | - Verify that your issue is not being currently addressed by other in[issues](https://github.com/SuperKogito/pydiogment/issues) or [pull requests](https://github.com/SuperKogito/pydiogment/pulls).
111 |
112 | - Please ensure all code snippets and error messages are formatted appropriately. See [Creating and highlighting code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks).
113 |
114 | - Please include your operating system type and version number, as well as your Python, pydiogment, numpy, and scipy versions. This information can be found by running the following code snippet:
115 |
116 | ```python
117 | import sys
118 | import numpy
119 | import scipy
120 | import pydiogment
121 | import platform
122 |
123 |
124 | print(platform.platform())
125 | print("Python", sys.version)
126 | print("NumPy", numpy.__version__)
127 | print("SciPy", scipy.__version__)
128 | print("pydiogment", pydiogment.__version__)
129 | ```
130 |
131 | Documentation
132 | -------------
133 |
134 | You can edit the documentation using any text editor and then generate the HTML output by typing `make html` from the docs/ directory. The resulting HTML files will be placed in `_build/html/` and are viewable in a web browser. See the README file in the doc/ directory for more information.
135 |
136 | To build the documentation, you will need:
137 |
138 | - [sphinx](http://sphinx.pocoo.org/).
139 | - [sphinxcontrib-napoleon](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/).
140 |
141 | Note
142 | ----
143 |
144 | This document was based on the [scikit-learn](http://scikit-learn.org/) & [librosa](https://github.com/librosa/librosa) contribution guides.
145 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2019, Ayoub Malek
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | 3. Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | :bell: Pydiogment
6 | ==========
7 |
8 | [](https://travis-ci.org/SuperKogito/pydiogment) [](https://ci.appveyor.com/project/SuperKogito/pydiogment) [](https://pydiogment.readthedocs.io/en/latest/?badge=latest) [%20-blue)](https://github.com/SuperKogito/pydiogment/blob/master/LICENSE) [](https://www.python.org/doc/versions/) [](https://codecov.io/gh/SuperKogito/pydiogment) [](https://coveralls.io/github/SuperKogito/pydiogment?branch=master) [](https://www.codefactor.io/repository/github/superkogito/pydiogment/overview/master)
9 |
10 | **Pydiogment** aims to simplify audio augmentation. It generates multiple audio files based on a starting mono audio file. The library can generates files with higher speed, slower, and different tones etc.
11 |
12 | :inbox_tray: Installation
13 | ============
14 |
15 | Dependencies
16 | ------------
17 |
18 | **Pydiogment** requires:
19 |
20 | - [Python](https://www.python.org/download/releases/3.0/) (>= 3.5)
21 | - [NumPy](https://numpy.org/) (>= 1.17.2)
22 |
23 | - [SciPy](https://www.scipy.org/) (>= 1.3.1)
24 |
25 | - [FFmpeg](https://www.ffmpeg.org/)
26 |
27 | ### On Linux
28 | On Linux you can use the following commands to get the libraries:
29 | - Numpy: `pip install numpy`
30 | - Scipy: `pip install scipy`
31 | - FFmpeg: `sudo apt install ffmpeg`
32 |
33 | ### On Windows
34 | On Windows you can use the following installation binaries:
35 | - Numpy: https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy or if you have Python already installed you can use install it using `pip3 install numpy`
36 | - Scipy: https://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
37 | - FFmpeg: https://ffmpeg.org/download.html#build-windows
38 |
39 | ### On MacOS
40 | On MacOs, use homebrew to install the packages:
41 | - Numpy: `brew install numpy --with-python3`
42 | - Scipy: You need to first install a compilation tool like Gfortran using homebrew `brew install gfortran` when it's done, install Scipy `pip install scipy`
43 | for more information and guidelines you can check this link: https://github.com/scipy/scipy/blob/master/INSTALL.rst.txt#mac-os-x
44 | - FFmpeg: `brew install ffmpeg`
45 |
46 |
47 | Installation
48 | -------------
49 | If you already have a working installation of [NumPy](https://numpy.org/) and [SciPy](https://www.scipy.org/) , you can simply install **Pydiogment** using pip:
50 |
51 | ```
52 | pip install pydiogment
53 | ```
54 | To update an existing version of **Pydiogment**, use:
55 | ```
56 | pip install -U pydiogment
57 | ```
58 |
59 | :bulb: How to use
60 | ==========
61 |
62 | - ## Amplitude related augmentation
63 | - ### Apply a fade in and fade out effect
64 | ```python3
65 | from pydiogment.auga import fade_in_and_out
66 |
67 | test_file = "path/test.wav"
68 | fade_in_and_out(test_file)
69 | ```
70 |
71 | - ### Apply gain to file
72 | ```python3
73 | from pydiogment.auga import apply_gain
74 |
75 | test_file = "path/test.wav"
76 | apply_gain(test_file, -100)
77 | apply_gain(test_file, -50)
78 | ```
79 |
80 | - ### Add Random Gaussian Noise based on SNR to file
81 | ```python3
82 | from pydiogment.auga import add_noise
83 |
84 | test_file = "path/test.wav"
85 | add_noise(test_file, 10)
86 | ```
87 |
88 |
89 | - ## Frequency related augmentation
90 | - ### Change file tone
91 | ```python3
92 | from pydiogment.augf import change_tone
93 |
94 | test_file = "path/test.wav"
95 | change_tone(test_file, 0.9)
96 | change_tone(test_file, 1.1)
97 | ```
98 |
99 | - ## Time related augmentation
100 | - #### Slow-down/ speed-up file
101 | ```python3
102 | from pydiogment.augt import slowdown, speed
103 |
104 | test_file = "path/test.wav"
105 | slowdown(test_file, 0.8)
106 | speed(test_file, 1.2)
107 | ```
108 |
109 | - ### Apply random cropping to the file
110 | ```python3
111 | from pydiogment.augt import random_cropping
112 |
113 | test_file = "path/test.wav"
114 | random_cropping(test_file, 1)
115 | ```
116 |
117 | - ### Change shift data on the time axis in a certain direction
118 | ```python3
119 | from pydiogment.augt import shift_time
120 |
121 | test_file = "path/test.wav"
122 | shift_time(test_file, 1, "right")
123 | shift_time(test_file, 1, "left")
124 | ```
125 | - ## Audio files format
126 | This library currently supports mono WAV files only.
127 |
128 | :bookmark_tabs: Documentation
129 | ==============
130 | A thorough documentation of the library is available under [pydiogment.readthedocs.io](https://pydiogment.readthedocs.io/en/latest/index.html).
131 |
132 | :construction_worker: Contributing and bugs report
133 | ============
134 |
135 | Contributions are welcome and encouraged. To learn more about how to contribute to **Pydiogment** please refer to the [Contributing guidelines](https://github.com/SuperKogito/pydiogment/blob/master/CONTRIBUTING.md)
136 |
137 | To report bugs, request a feature or just ask for help you can refer to the [issues](https://github.com/SuperKogito/pydiogment/issuesif) section.
138 | Before reporting a bug please make sure it is not addressed by an older issue and make sure to add your operating system type, its version number and the versions of the dependencies used.
139 |
140 | :tada: Acknowledgment and credits
141 | ============================
142 | - The test file used in the pytests is [OSR_us_000_0060_8k.wav](https://www.voiptroubleshooter.com/open_speech/american/OSR_us_000_0060_8k.wav) from the [Open Speech Repository](https://www.voiptroubleshooter.com/open_speech/american.html).
143 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | branches:
2 | only:
3 | - master
4 |
5 | environment:
6 | matrix:
7 | - PYTHON_VERSION: 3.5
8 | MINICONDA: C:\Miniconda
9 | - PYTHON_VERSION: 3.6
10 | MINICONDA: C:\Miniconda3
11 | - PYTHON_VERSION: 3.7
12 | MINICONDA: C:\Miniconda3
13 |
14 | cache:
15 | - "%MINICONDA%\\envs -> appveyor.yml, setup.py"
16 |
17 | init:
18 | - "ECHO %PYTHON_VERSION% %MINICONDA%"
19 |
20 | install:
21 | - "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
22 | - conda config --set always_yes yes --set changeps1 no
23 | - conda update -q conda
24 | - conda info -a
25 | - "conda create -q -n test-environment python=%PYTHON_VERSION% numpy scipy nose"
26 | - activate test-environment
27 | - cinst ffmpeg
28 | - pip install --upgrade setuptools
29 | - pip install pytest
30 | - pip install pytest-cov pytest
31 | - pip install codecov
32 | - pip install coveralls
33 | - pip install pytest-xdist
34 | - pip install codacy-coverage
35 | - pip install matplotlib
36 | - pip install -r requirements.txt
37 |
38 | build: off
39 | test_script:
40 | - pytest
41 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | SOURCEDIR = source
8 | BUILDDIR = build
9 |
10 | # Put it first so that "make" without argument is like "make help".
11 | help:
12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13 |
14 | .PHONY: help Makefile
15 |
16 | # Catch-all target: route all unknown targets to Sphinx using the new
17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18 | %: Makefile
19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
--------------------------------------------------------------------------------
/docs/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/icon.png
--------------------------------------------------------------------------------
/docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=source
11 | set BUILDDIR=build
12 |
13 | if "%1" == "" goto help
14 |
15 | %SPHINXBUILD% >NUL 2>NUL
16 | if errorlevel 9009 (
17 | echo.
18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19 | echo.installed, then set the SPHINXBUILD environment variable to point
20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
21 | echo.may add the Sphinx directory to PATH.
22 | echo.
23 | echo.If you don't have Sphinx installed, grab it from
24 | echo.http://sphinx-doc.org/
25 | exit /b 1
26 | )
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/docs/requirements.txt:
--------------------------------------------------------------------------------
1 |
2 | sphinxcontrib-napoleon==0.6.1
3 | numpy
4 | scipy
5 |
--------------------------------------------------------------------------------
/docs/source/_static/creativecommons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/creativecommons.png
--------------------------------------------------------------------------------
/docs/source/_static/css/custom.css:
--------------------------------------------------------------------------------
1 | /* Provided by Sphinx's 'basic' theme, and included in the final set of assets */
2 | @import "../basic.css";
3 | @import url('https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap');
4 |
5 | :root {
6 | /*****************************************************************************
7 | * Theme config
8 | **/
9 | --pst-header-height: 30px;
10 |
11 | /*****************************************************************************
12 | * Font size
13 | **/
14 | --pst-font-size-base: 12px; /* base font size - applied at body / html level */
15 |
16 | /* heading font sizes */
17 | --pst-font-size-h1: 24px;
18 | --pst-font-size-h2: 22px;
19 | --pst-font-size-h3: 20px;
20 | --pst-font-size-h4: 18px;
21 | --pst-font-size-h5: 16px;
22 | --pst-font-size-h6: 14px;
23 |
24 | /* smaller then heading font sizes*/
25 | --pst-font-size-milli: 10px;
26 |
27 | --pst-sidebar-font-size: 0.9em;
28 | --pst-sidebar-caption-font-size: 0.9em;
29 |
30 | /*****************************************************************************
31 | * Font family
32 | **/
33 | /* These are adapted from https://systemfontstack.com/ */
34 | --pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI,
35 | "Helvetica Neue", Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji,
36 | Segoe UI Symbol;
37 | --pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco,
38 | Liberation Mono, Lucida Console, monospace;
39 |
40 |
41 |
42 | --pst-font-family-base-system: 'Ubuntu Mono', monospace;
43 | --pst-font-family-monospace-system: 'Ubuntu Mono', monospace;
44 |
45 | --pst-font-family-base: var(--pst-font-family-base-system);
46 | --pst-font-family-heading: var(--pst-font-family-base);
47 | --pst-font-family-monospace: var(--pst-font-family-monospace-system);
48 |
49 | /*****************************************************************************
50 | * Color
51 | *
52 | * Colors are defined in rgb string way, "red, green, blue"
53 | **/
54 | --pst-color-primary: 19, 6, 84;
55 | --pst-color-success: 40, 167, 69;
56 | --pst-color-info: 0, 123, 255; /*23, 162, 184;*/
57 | --pst-color-warning: 255, 193, 7;
58 | --pst-color-danger: 220, 53, 69;
59 | --pst-color-text-base: 51, 51, 51;
60 |
61 | --pst-color-h1: var(--pst-color-primary);
62 | --pst-color-h2: var(--pst-color-primary);
63 | --pst-color-h3: var(--pst-color-text-base);
64 | --pst-color-h4: var(--pst-color-text-base);
65 | --pst-color-h5: var(--pst-color-text-base);
66 | --pst-color-h6: var(--pst-color-text-base);
67 | --pst-color-paragraph: var(--pst-color-text-base);
68 | --pst-color-link: 0, 91, 129;
69 | --pst-color-link-hover: 227, 46, 0;
70 | --pst-color-headerlink: 198, 15, 15;
71 | --pst-color-headerlink-hover: 255, 255, 255;
72 | --pst-color-preformatted-text: 34, 34, 34;
73 | --pst-color-preformatted-background: 250, 250, 250;
74 | --pst-color-inline-code: 232, 62, 140;
75 |
76 | --pst-color-active-navigation: 19, 6, 84;
77 | --pst-color-navbar-link: 77, 77, 77;
78 | --pst-color-navbar-link-hover: var(--pst-color-active-navigation);
79 | --pst-color-navbar-link-active: var(--pst-color-active-navigation);
80 | --pst-color-sidebar-link: 77, 77, 77;
81 | --pst-color-sidebar-link-hover: var(--pst-color-active-navigation);
82 | --pst-color-sidebar-link-active: var(--pst-color-active-navigation);
83 | --pst-color-sidebar-expander-background-hover: 244, 244, 244;
84 | --pst-color-sidebar-caption: 77, 77, 77;
85 | --pst-color-toc-link: 119, 117, 122;
86 | --pst-color-toc-link-hover: var(--pst-color-active-navigation);
87 | --pst-color-toc-link-active: var(--pst-color-active-navigation);
88 |
89 | /*****************************************************************************
90 | * Icon
91 | **/
92 |
93 | /* font awesome icons*/
94 | --pst-icon-check-circle: "\f058";
95 | --pst-icon-info-circle: "\f05a";
96 | --pst-icon-exclamation-triangle: "\f071";
97 | --pst-icon-exclamation-circle: "\f06a";
98 | --pst-icon-times-circle: "\f057";
99 | --pst-icon-lightbulb: "\f0eb";
100 |
101 | /*****************************************************************************
102 | * Admonitions
103 | **/
104 |
105 | --pst-color-admonition-default: var(--pst-color-info);
106 | --pst-color-admonition-note: var(--pst-color-info);
107 | --pst-color-admonition-attention: var(--pst-color-warning);
108 | --pst-color-admonition-caution: var(--pst-color-warning);
109 | --pst-color-admonition-warning: var(--pst-color-warning);
110 | --pst-color-admonition-danger: var(--pst-color-danger);
111 | --pst-color-admonition-error: var(--pst-color-danger);
112 | --pst-color-admonition-hint: var(--pst-color-success);
113 | --pst-color-admonition-tip: var(--pst-color-success);
114 | --pst-color-admonition-important: var(--pst-color-success);
115 |
116 | --pst-icon-admonition-default: var(--pst-icon-info-circle);
117 | --pst-icon-admonition-note: var(--pst-icon-info-circle);
118 | --pst-icon-admonition-attention: var(--pst-icon-exclamation-circle);
119 | --pst-icon-admonition-caution: var(--pst-icon-exclamation-triangle);
120 | --pst-icon-admonition-warning: var(--pst-icon-exclamation-triangle);
121 | --pst-icon-admonition-danger: var(--pst-icon-exclamation-triangle);
122 | --pst-icon-admonition-error: var(--pst-icon-times-circle);
123 | --pst-icon-admonition-hint: var(--pst-icon-lightbulb);
124 | --pst-icon-admonition-tip: var(--pst-icon-lightbulb);
125 | --pst-icon-admonition-important: var(--pst-icon-exclamation-circle);
126 |
127 | /*****************************************************************************
128 | * versionmodified
129 | **/
130 |
131 | --pst-color-versionmodified-default: var(--pst-color-info);
132 | --pst-color-versionmodified-added: var(--pst-color-success);
133 | --pst-color-versionmodified-changed: var(--pst-color-warning);
134 | --pst-color-versionmodified-deprecated: var(--pst-color-danger);
135 |
136 | --pst-icon-versionmodified-default: var(--pst-icon-exclamation-circle);
137 | --pst-icon-versionmodified-added: var(--pst-icon-exclamation-circle);
138 | --pst-icon-versionmodified-changed: var(--pst-icon-exclamation-circle);
139 | --pst-icon-versionmodified-deprecated: var(--pst-icon-exclamation-circle);
140 | }
141 |
142 | /* Bio area */
143 | div.profile-pic {
144 | margin-top: 1em;
145 | }
146 |
147 | div.profile-pic img {
148 | border-radius: 500px;
149 | width: 80%;
150 | max-width: 190px;
151 | margin: 0 auto;
152 | display: block;
153 | }
154 |
155 | .bio-info {
156 | margin: 1em auto;
157 | max-width: 220px;
158 | }
159 |
160 | .name {
161 | font-size: 38px;
162 | }
163 |
164 | .focusareas {
165 | font-size: .9em;
166 | font-weight: bold;
167 | }
168 |
169 | .whatido {
170 | margin-top: 1em;
171 | }
172 |
173 |
174 | /* Sidebar for blog archive / each post */
175 | ul.ablog-archive {
176 | padding-left: 0px;
177 | }
178 |
179 | .bd-sidebar h2 {
180 | font-size: 1.4em;
181 | }
182 |
183 | .bd-sidebar ul {
184 | padding-left: 0;
185 | list-style-type: none;
186 | }
187 |
188 | .bd-sidebar li {
189 | padding-bottom: .5em;
190 | }
191 |
192 | div.bd-sidebar h3, div.bd-sidebar h2, div.bd-sidebar ul {
193 | padding-left: 5%;
194 | }
195 |
196 | /* In-page post lists */
197 | ul.postlist {
198 | padding-left: 0;
199 | }
200 |
201 | ul.postlist > li > p:first-child {
202 | font-size: 14px;
203 | }
204 |
205 | ul.postlist li + li {
206 | margin-top: 0em;
207 | }
208 |
209 | ul.postlist li > p > a {
210 | font-style: normal;
211 | font-size: 14px;
212 | }
213 |
214 |
215 | /* Timeline CSS */
216 | div.timeline div.card {
217 | border: 0px;
218 | }
219 |
220 | div.timeline div.left {
221 | text-align: right;
222 | border-right: 1px solid black;
223 | }
224 |
225 | div.timeline div.entry::after {
226 | width: 1em;
227 | height: 1em;
228 | background: white;
229 | border-radius: 50%;
230 | content: "";
231 | top: 1em;
232 | display: block;
233 | position: absolute;
234 | border: 1px black solid;
235 | z-index: 999;
236 | }
237 |
238 | div.timeline div.entry.left::after {
239 | right: -.5em;
240 | }
241 |
242 | div.timeline div.entry.right::after {
243 | left: -.5em;
244 | }
245 |
246 |
247 | /* Blog post comments */
248 | .gsc-reactions {
249 | margin-top: 1em;
250 | }
251 |
--------------------------------------------------------------------------------
/docs/source/_static/favicon_io/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/favicon_io/android-chrome-192x192.png
--------------------------------------------------------------------------------
/docs/source/_static/favicon_io/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/favicon_io/android-chrome-512x512.png
--------------------------------------------------------------------------------
/docs/source/_static/favicon_io/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/favicon_io/apple-touch-icon.png
--------------------------------------------------------------------------------
/docs/source/_static/favicon_io/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/favicon_io/favicon-16x16.png
--------------------------------------------------------------------------------
/docs/source/_static/favicon_io/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/favicon_io/favicon-32x32.png
--------------------------------------------------------------------------------
/docs/source/_static/favicon_io/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/favicon_io/favicon.ico
--------------------------------------------------------------------------------
/docs/source/_static/favicon_io/site.webmanifest:
--------------------------------------------------------------------------------
1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
--------------------------------------------------------------------------------
/docs/source/_static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/logo.png
--------------------------------------------------------------------------------
/docs/source/_static/logo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperKogito/pydiogment/074543dc9483b450653f8a00c8279bf1eb873199/docs/source/_static/logo1.png
--------------------------------------------------------------------------------
/docs/source/_templates/footer.html:
--------------------------------------------------------------------------------
1 |