Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe committed Feb 5, 2023
1 parent ed8229a commit 2413884
Show file tree
Hide file tree
Showing 222 changed files with 22,322 additions and 11,844 deletions.
72 changes: 56 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,68 @@ on:
types: rebuild


env:
CACHE_NUMBER: 0 # increase to reset cache manually

concurrency:
group: run_tests-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/my-env

#- os: macos-latest
# label: osx-64
# prefix: /Users/runner/miniconda3/envs/my-env

#- os: windows-latest
# label: win-64
# prefix: C:\Miniconda3\envs\my-env

name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
- uses: actions/checkout@v2

- name: Cache MFA models
uses: actions/cache@v3
env:
cache-name: cache-mfa-models
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions tox-conda twine build setuptools setuptools_scm[toml] wheel
- name: sdist
run: python setup.py sdist
- name: Test with tox
run: tox
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v2.0.3"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
path: |
~/Documents/MFA
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: my-env
use-mamba: true
- name: Set cache date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV

- uses: actions/cache@v2
with:
file: ./coverage.xml
fail_ci_if_error: true
path: ${{ matrix.prefix }}
key: ${{ matrix.label }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
id: cache

- name: Update environment
run: mamba env update -n my-env -f environment.yml
if: steps.cache.outputs.cache-hit != 'true'

- name: Run tests
shell: bash -l {0}
run: pytest -x ./tests
8 changes: 1 addition & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ default_language_version:
python: python3.8
repos:
- repo: https://github.com/psf/black
rev: 21.8b0
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: v1.11.0
hooks:
- id: blacken-docs
additional_dependencies:
- black==20.8b1
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
Expand Down
3 changes: 2 additions & 1 deletion ci/mfa_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ dependencies:
- pyyaml
- kaldi
- sox
- ffmpeg
- openfst
- baumwelch
- ngram
- praatio
- pynini
- setuptools
- setuptools_scm[toml]
- pip
- pip:
- build
- twine
- praatio >= 5.0
101 changes: 93 additions & 8 deletions docs/source/_static/css/style.css → docs/source/_static/css/mfa.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,84 @@
font-style: italic;
src: url(../fonts/GentiumPlus-BoldItalic.woff2);
}


:root {
--base-blue: #003566;
--dark-blue: #001D3D;
--very-dark-blue: #000814;
--light-blue: #0E63B3;
--very-light-blue: #7AB5E6;
--base-yellow: #FFC300;
--dark-yellow: #E3930D;
--light-yellow: #FFD60A;
}

html[data-theme="light"] {
--sd-color-primary: var(--base-blue);
--mfa-admonition-text-color: #cecece;
--sd-color-dark: var(--base-blue);
--sd-color-primary-text: #FFC300;
--sd-color-primary-highlight: #FFC300;
--pst-color-primary: var(--base-blue);
--pst-color-warning: var(--light-yellow);
--pst-color-info: var(--light-blue);
--pst-color-admonition-default: var(--light-blue);

--pst-color-link: var(--light-blue);
--pst-color-link-hover: var(--dark-blue);

--pst-color-active-navigation: var(--dark-blue);
--pst-color-hover-navigation: var(--base-yellow);

--pst-color-navbar-link: var(--base-blue);
--pst-color-navbar-link-hover: var(--pst-color-hover-navigation);
--pst-color-navbar-link-active: var(--pst-color-active-navigation);

--pst-color-sidebar-link: var(--base-blue);
--pst-color-sidebar-caption: var(--base-blue);
--pst-color-sidebar-link-hover: var(--pst-color-hover-navigation);
--pst-color-sidebar-link-active: var(--pst-color-active-navigation);

--pst-color-toc-link: var(--base-blue);
--pst-color-toc-link-hover: var(--pst-color-hover-navigation);
--pst-color-toc-link-active: var(--pst-color-active-navigation);
}
/*******************************************************************************
* dark theme
*
* all the variables used for dark theme coloring
*/
html[data-theme="dark"] {
--sd-color-primary: var(--base-blue);
--sd-color-card-text: var(--base-yellow);
--sd-color-dark: var(--base-blue);
--sd-color-primary-text: var(--base-yellow);
--sd-color-primary-highlight: var(--base-yellow);
--pst-color-primary: var(--base-yellow);
--pst-color-warning: var(--light-yellow);
--pst-color-info: var(--light-blue);
--mfa-admonition-text-color: var(--pst-color-text-base);
--pst-color-link: var(--very-light-blue);
--pst-color-link-hover: var(--light-yellow);

--pst-color-active-navigation: var(--base-yellow);
--pst-color-hover-navigation: var(--very-light-blue);

--pst-color-navbar-link: var(--light-blue);
--pst-color-navbar-link-hover: var(--pst-color-hover-navigation);
--pst-color-navbar-link-active: var(--pst-color-active-navigation);

--pst-color-sidebar-link: var(--base-yellow);
--pst-color-sidebar-caption: var(--base-yellow);
--pst-color-sidebar-link-hover: var(--pst-color-hover-navigation);
--pst-color-sidebar-link-active: var(--pst-color-active-navigation);

--pst-color-toc-link: var(--base-yellow);
--pst-color-toc-link-hover: var(--pst-color-hover-navigation);
--pst-color-toc-link-active: var(--pst-color-active-navigation);
}

.container, .container-xl, .container-lg {
max-width: 2400px !important;
}
Expand Down Expand Up @@ -102,10 +180,10 @@ html[data-theme="dark"] {
--very-light-blue: #7AB5E6;
--base-yellow: #FFC300;
--light-yellow: #FFD60A;
--sd-color-primary: #003566;
--sd-color-dark: #003566;
--sd-color-primary-text: #FFC300;
--sd-color-primary-highlight: #FFC300;
--sd-color-primary: var(--base-blue);
--sd-color-dark: var(--base-blue);
--sd-color-primary-text: var(--base-yellow);
--sd-color-primary-highlight: var(--base-blue);
--pst-color-primary: var(--base-yellow);
--pst-color-warning: var(--light-yellow);
--pst-color-info: var(--light-blue);
Expand Down Expand Up @@ -135,7 +213,7 @@ font-weight: bold;
}

.sd-btn-primary:hover{
color: var(--sd-color-primary) !important;
background-color: var(--light-blue) !important;
}
.i-navigation{
color: var(--sd-color-primary);
Expand All @@ -160,12 +238,16 @@ div[class*="highlight-"] {
text-align: left;
}

ipa-inline {
.ipa-inline {
font-family: "GentiumPlusW";
font-size: 1.1em;
font-weight: 500;
}

.ipa-highlight, .ipa-inline {
color: var(--pst-color-inline-code);
}

.supported {
background-color: #E9F6EC;
}
Expand All @@ -177,6 +259,9 @@ background-color: #FBEAEC;
color: inherit;
}

dt:target {
background-color: #FFD60A;
html[data-theme="light"] dt:target {
background-color: var(--base-yellow);
}
html[data-theme="dark"] dt:target{
background-color: var(--dark-blue);
}
6 changes: 3 additions & 3 deletions docs/source/_static/interrogate_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:html_theme.sidebar_secondary.remove:

{{ objname }}
{{ underline }}

Expand Down
2 changes: 2 additions & 0 deletions docs/source/_templates/autosummary/function.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:html_theme.sidebar_secondary.remove:

{{ objname }}
{{ underline }}

Expand Down
9 changes: 0 additions & 9 deletions docs/source/_templates/sidebar-nav-bs.html

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/changelog/changelog_2.0_pre_release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Beta releases
- Added :class:`~montreal_forced_aligner.corpus.multiprocessing.Job` class as well to make it easier to generate and keep track of information about different processes
- Updated installation style to be more dependent on conda-forge packages

- Kaldi and MFA are now on conda-forge! |:tada:|
- Kaldi and MFA are now on conda-forge! :fas:`party-horn`

- Added a :code:`mfa model` command for inspecting, listing, downloading, and saving pretrained models, see :ref:`pretrained_models` for more information.
- Fixed a bug where saving command history with errors would throw an error of its own
Expand Down
20 changes: 20 additions & 0 deletions docs/source/changelog/changelog_2.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

.. _changelog_2.1:

*************
2.1 Changelog
*************

2.1.0
=====

- Drop support for SQLite as a database backend
- Fixed a bug where TextGrid parsing errors would cause MFA to crash rather than ignore those files
- Updated CLI to use :xref:`click` rather than argparse
- Added :code:`--use_phone_model` flag for :code:`mfa align` and :code:`mfa validate` commands. See :ref:`phone_models` for more details.
- Added :code:`--phone_confidence` flag for :code:`mfa validate` commands. See :ref:`phone_models` for more details.
- Added modeling of :code:`cutoff` phones via :code:`--use_cutoff_model` which adds progressive truncations of the next word, if it's not unknown or a non-speech word (silence, laughter, etc). See :ref:`cutoff_modeling` for more details.
- Added support for using :xref:`speechbrain`'s VAD model in :ref:`create_segments`
- Overhaul and update :ref:`train_ivector`
- Overhaul and update :ref:`diarize_speakers`
- Added support for using :xref:`speechbrain`'s SpeakerRecognition model in :ref:`diarize_speakers`
Loading

0 comments on commit 2413884

Please sign in to comment.