Skip to content

Commit

Permalink
Mandarin updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe committed Feb 25, 2024
1 parent f76a59f commit 2e48814
Show file tree
Hide file tree
Showing 42 changed files with 92,944 additions and 194,092 deletions.
395 changes: 395 additions & 0 deletions acoustic/mandarin/mfa/v3.0.0/LICENSE

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions acoustic/mandarin/mfa/v3.0.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Mandarin MFA acoustic model v3.0.0

[Link to documentation on mfa-models](https://mfa-models.readthedocs.io/en/main/acoustic/mandarin_mfa.html)

Jump to section:

- [Model details](#model-details)
- [Installation](#installation)
- [Intended use](#intended-use)
- [Performance Factors](#performance-factors)
- [Metrics](#metrics)
- [Ethical considerations](#ethical-considerations)
- [Troubleshooting issues](#troubleshooting-issues)
- [Training data](#training-data)
- [Evaluation data](#evaluation-data)

## Model details

- **Maintainer:** [Montreal Forced Aligner](https://montreal-forced-aligner.readthedocs.io/)
- **Language:** [Mandarin Chinese](https://en.wikipedia.org/wiki/Mandarin_Chinese)
- **Dialect:** N/A
- **Phone set:** [MFA](https://mfa-models.readthedocs.io/en/refactor/mfa_phone_set.html#mandarin)
- **Model type:** `Acoustic`
- **Features:** `MFCC + pitch`
- **Architecture:** `gmm-hmm`
- **Model version:** `v3.0.0`
- **Trained date:** `2024-02-24`
- **Compatible MFA version:** `v3.0.0`
- **License:** [CC BY 4.0](https://github.com/MontrealCorpusTools/mfa-models/tree/main/acoustic/mandarin/mfa/v3.0.0/LICENSE)
- **Citation:**

```bibtex
@techreport{mfa_mandarin_mfa_acoustic_2024,
author={McAuliffe, Michael and Sonderegger, Morgan},
title={Mandarin MFA acoustic model v3.0.0},
address={\url{https://mfa-models.readthedocs.io/acoustic/Mandarin/Mandarin MFA acoustic model v3_0_0.html}},
year={2024},
month={Feb},
}
```

- If you have comments or questions about this model, you can check [previous MFA model discussion posts](https://github.com/MontrealCorpusTools/mfa-models/discussions?discussions_q=Mandarin+MFA+acoustic+model+v3.0.0) or create [a new one](https://github.com/MontrealCorpusTools/mfa-models/discussions/new).

## Installation

Install from the [MFA command line](https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/models/index.html):

```
mfa model download acoustic mandarin_mfa
```

Or download from [the release page](https://github.com/MontrealCorpusTools/mfa-models/releases/tag/acoustic-mandarin_mfa-v3.0.0).

## Intended use

This model is intended for forced alignment of [Mandarin Chinese](https://en.wikipedia.org/wiki/Mandarin_Chinese) transcripts.

This model uses the [MFA](https://mfa-models.readthedocs.io/en/refactor/mfa_phone_set.html#mandarin) phone set for Mandarin, and was trained with the pronunciation dictionaries above. Pronunciations can be added on top of the dictionary, as long as no additional phones are introduced.

## Performance Factors

As forced alignment is a relatively well-constrained problem (given accurate transcripts), this model should be applicable to a range of recording conditions and speakers. However, please note that it was trained on read speech in low-noise environments, so as your data diverges from that, you may run into alignment issues or need to [increase the beam size of MFA](https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/configuration/#configuring-specific-commands) or see other recommendations in the [troubleshooting section below](#troubleshooting-issues).

Please note as well that MFA does not use state-of-the-art ASR models for forced alignment. You may get better performance (especially on speech-to-text tasks) using other frameworks like [Coqui](https://coqui.ai/).

## Metrics

Acoustic models are typically generated as one component of a larger ASR system where the metric is word error rate (WER). For forced alignment, there is typically not the same sort of gold standard measure for most languages.

As a rough approximation of the acoustic model quality, we evaluated it against the corpus it was trained on alongside a language model trained from the same data. Key caveat here is that this is not a typical WER measure on held out data, so it should not be taken as a hard measure of how well an acoustic model will generalize to your data, but rather is more of a sanity check that the training data quality was sufficiently high.

Using the pronunciation dictionaries and language models above:

- **WER:** `0%`
- **CER:** `0%`

## Ethical considerations

Deploying any Speech-to-Text model into any production setting has ethical implications. You should consider these implications before use.

### Demographic Bias

You should assume every machine learning model has demographic bias unless proven otherwise. For STT models, it is often the case that transcription accuracy is better for men than it is for women. If you are using this model in production, you should acknowledge this as a potential issue.

### Surveillance

Speech-to-Text technologies may be misused to invade the privacy of others by recording and mining information from private conversations. This kind of individual privacy is protected by law in many countries. You should not assume consent to record and analyze private speech.


## Troubleshooting issues

Machine learning models (like this acoustic model) perform best on data that is similar to the data on which they were trained.

The primary sources of variability in forced alignment will be the applicability of the pronunciation dictionary and how similar the speech, demographics, and recording conditions are. If you encounter issues in alignment, there are couple of avenues to improve performance:

1. [Increase the beam size of MFA](https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/configuration/#configuring-specific-commands)

* MFA defaults to a narrow beam to ensure quick alignment and also as a way to detect potential issues in your dataset, but depending on your data, you might benefit from boosting the beam to 100 or higher.

2. Add pronunciations to the pronunciation dictionary

* This model was trained a particular dialect/style, and so adding pronunciations more representative of the variety spoken in your dataset will help alignment.

3. Check the quality of your data

* MFA includes a [validator utility](https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/data_validation.html), which aims to detect issues in the dataset.
* Use MFA's [anchor utility](https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/workflows/anchor.html) to visually inspect your data as MFA sees it and correct issues in transcription or OOV items.

4. Adapt the model to your data

* MFA has an [adaptation command](https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/workflows/adapt_acoustic_model.html) to adapt some of the model to your data based on an initial alignment, and then run another alignment with the adapted model.

## Training data

This model was trained on the following corpora:



* [Common Voice Chinese (China)](../../../../corpus/mandarin/common_voice_chinese_china/16.1/README.md):
* **Hours:** `84.67`
* **Speakers:** `4,461`
* **Utterances:** `56,862`

* [Common Voice Chinese (Taiwan)](../../../../corpus/mandarin/common_voice_chinese_taiwan/16.1/README.md):
* **Hours:** `100.71`
* **Speakers:** `1,703`
* **Utterances:** `112,047`

* [AI-DataTang Corpus](../../../../corpus/mandarin/ai_datatang_corpus/README.md):
* **Hours:** `200.38`
* **Speakers:** `600`
* **Utterances:** `237,265`

* [AISHELL-3](../../../../corpus/mandarin/aishell_3/README.md):
* **Hours:** `160.88`
* **Speakers:** `360`
* **Utterances:** `127,274`

* [THCHS-30](../../../../corpus/mandarin/thchs_30/README.md):
* **Hours:** `34.16`
* **Speakers:** `60`
* **Utterances:** `13,388`

* [GlobalPhone Chinese-Mandarin](../../../../corpus/mandarin/globalphone_chinese_mandarin/3.1/README.md):
* **Hours:** `31.16`
* **Speakers:** `132`
* **Utterances:** `10,225`
16 changes: 16 additions & 0 deletions acoustic/mandarin/mfa/v3.0.0/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "mandarin_mfa",
"language": "Mandarin",
"dialect": "",
"phone_set": "MFA",
"version": "3.0.0",
"maintainer": "[Montreal Forced Aligner](https://montreal-forced-aligner.readthedocs.io/)",
"citation": "@techreport{mfa_mandarin_mfa_acoustic_2024,\n\tauthor={McAuliffe, Michael and Sonderegger, Morgan},\n\ttitle={Mandarin MFA acoustic model v3.0.0},\n\taddress={\\url{https://mfa-models.readthedocs.io/acoustic/Mandarin/Mandarin MFA acoustic model v3_0_0.html}},\n\tyear={2024},\n\tmonth={Feb},\n}",
"license": "CC BY 4.0",
"license_link": "[CC BY 4.0](https://github.com/MontrealCorpusTools/mfa-models/tree/main/acoustic/mandarin/mfa/v3.0.0/LICENSE)",
"architecture": "gmm-hmm",
"features": "MFCC + pitch",
"evaluation": {},
"decode": {},
"train_date": "2024-02-24"
}
12 changes: 12 additions & 0 deletions config/acoustic/phone_groups/mandarin_mfa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@
- k
-
-
-
-
- l
- ʎ
-
- m
-
-
- m̩˥
- m̩˥˩
Expand All @@ -66,6 +69,7 @@
- m̩˨˩˦
-
- n
- ɲ
-
- n̩˥˩
- n̩˧˥
Expand Down Expand Up @@ -93,6 +97,8 @@
- p
-
-
-
-
-
- s
-
Expand All @@ -103,6 +109,8 @@
- tsʰ
-
-
-
-
-
- u
-
Expand All @@ -114,6 +122,7 @@
- w
-
- x
-
-
- y
-
Expand Down Expand Up @@ -160,12 +169,15 @@
-
- ʂ
- ɕ
- ʂʷ
- ɕʷ
-
- ʈʂ
-
-
- ʈʂʰ
- tɕʰ
- tɕʷ
-
- ɻ
-
Expand Down
52 changes: 52 additions & 0 deletions config/acoustic/rules/mandarin_mfa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,55 @@ rules:
preceding_context: ''
replacement: ''
segment: ɻ
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'm j'
- following_context: ''
preceding_context: ''
replacement: 'ʎ'
segment: 'l j'
- following_context: ''
preceding_context: ''
replacement: 'ɲ'
segment: 'n j'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'tʰ j'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 't j'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'pʰ j'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'p j'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'pʰ w'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'p w'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'tʰ w'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 't w'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'kʰ w'
- following_context: ''
preceding_context: ''
replacement: ''
segment: 'k w'
31 changes: 31 additions & 0 deletions corpus/mandarin/common_voice_chinese_china/16.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Common Voice Chinese (China) v16.1

[Link to documentation on mfa-models](https://mfa-models.readthedocs.io/en/main/corpus/Common Voice Chinese (China) v16_1.html)

## Corpus details

- **Source:** [Common Voice Chinese (China)](https://voice.mozilla.org/en/datasets)
- **Language:** [Mandarin Chinese](https://en.wikipedia.org/wiki/Mandarin_Chinese)
- **Dialects:** [Standard Mandarin Chinese](https://en.wikipedia.org/wiki/Standard_Chinese), [Beijing Mandarin](https://en.wikipedia.org/wiki/Beijing_dialect)
- **Number of hours:** `84.67`
- **Number of utterances:** `56,862`
- **Number of speakers:** `4,461`
- **Female speakers:** `152`
- **Male speakers:** `748`
- **Unknown speakers:** `3,561`
- **License:** [CC-0](https://creativecommons.org/publicdomain/zero/1.0/)
- **Version:** `16.1`
- **Citation:**
```bibtex
@article{ardila2019common,
title = {Common voice: A massively-multilingual speech corpus},
author = {Ardila, Rosana and Branson, Megan and Davis, Kelly and Henretty, Michael and Kohler, Michael and
Meyer, Josh and Morais, Reuben and Saunders, Lindsay and Tyers, Francis M and Weber, Gregor},
journal = {arXiv preprint arXiv:1912.06670},
year = {2019}
}
```

- Please, note that no corpora are hosted by MFA, please see the link above for accessing the data.

- If you have comments or questions about using this corpus for MFA, you can check [previous MFA model discussion posts](https://github.com/MontrealCorpusTools/mfa-models/discussions?discussions_q=Common+Voice+Chinese+China+v16.1) or create [a new one](https://github.com/MontrealCorpusTools/mfa-models/discussions/new).
31 changes: 31 additions & 0 deletions corpus/mandarin/common_voice_chinese_taiwan/16.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Common Voice Chinese (Taiwan) v16.1

[Link to documentation on mfa-models](https://mfa-models.readthedocs.io/en/main/corpus/Common Voice Chinese (Taiwan) v16_1.html)

## Corpus details

- **Source:** [Common Voice Chinese (Taiwan)](https://voice.mozilla.org/en/datasets)
- **Language:** [Mandarin Chinese](https://en.wikipedia.org/wiki/Mandarin_Chinese)
- **Dialects:** [Taiwanese Mandarin](https://en.wikipedia.org/wiki/Taiwanese_Mandarin)
- **Number of hours:** `100.71`
- **Number of utterances:** `112,047`
- **Number of speakers:** `1,703`
- **Female speakers:** `191`
- **Male speakers:** `458`
- **Unknown speakers:** `1,054`
- **License:** [CC-0](https://creativecommons.org/publicdomain/zero/1.0/)
- **Version:** `16.1`
- **Citation:**
```bibtex
@article{ardila2019common,
title = {Common voice: A massively-multilingual speech corpus},
author = {Ardila, Rosana and Branson, Megan and Davis, Kelly and Henretty, Michael and Kohler, Michael and
Meyer, Josh and Morais, Reuben and Saunders, Lindsay and Tyers, Francis M and Weber, Gregor},
journal = {arXiv preprint arXiv:1912.06670},
year = {2019}
}
```

- Please, note that no corpora are hosted by MFA, please see the link above for accessing the data.

- If you have comments or questions about using this corpus for MFA, you can check [previous MFA model discussion posts](https://github.com/MontrealCorpusTools/mfa-models/discussions?discussions_q=Common+Voice+Chinese+Taiwan+v16.1) or create [a new one](https://github.com/MontrealCorpusTools/mfa-models/discussions/new).
Loading

0 comments on commit 2e48814

Please sign in to comment.