JackismyShephard commited on
Commit
02b2725
0 Parent(s):

initial_commit

Browse files

Fill out empty sections in auto-generated README

Update README.md

update readme

.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - da
4
+ license: mit
5
+ base_model: microsoft/speecht5_tts
6
+ tags:
7
+ - generated_from_trainer
8
+ datasets:
9
+ - alexandrainst/nst-da
10
+ model-index:
11
+ - name: speecht5_tts-finetuned-nst-da
12
+ results: []
13
+ metrics:
14
+ - mse
15
+ pipeline_tag: text-to-speech
16
+ ---
17
+
18
+ # speecht5_tts-finetuned-nst-da
19
+
20
+ This model is a fine-tuned version of [microsoft/speecht5_tts](https://huggingface.co/microsoft/speecht5_tts) on the NST Danish ASR Database dataset.
21
+ It achieves the following results on the evaluation set:
22
+ - Loss: 0.3738
23
+
24
+ ## Model description
25
+
26
+ Given that danish is a low-resource language, not many open-source implementations of a danish text-to-speech synthesizer are available online. As of writing, the only other existing implementations available on 🤗 are [facebook/seamless-streaming](https://huggingface.co/facebook/seamless-streaming) and [audo/seamless-m4t-v2-large](https://huggingface.co/audo/seamless-m4t-v2-large). This model has been developed to provide a simpler alternative that still performs reasonable well, both in terms of output quality and inference time. Additionally, contrary to the aforementioned models, this model also has an associated Space on 🤗 at [JackismyShephard/danish-speech-synthesis](https://huggingface.co/spaces/JackismyShephard/danish-speech-synthesis) which provides an easy interface for danish text-to-speech synthesis, as well as optional speech enhancement.
27
+
28
+ ## Intended uses & limitations
29
+
30
+ The model is intended for danish text-to-speech synthesis.
31
+
32
+ The model does not recognize special symbols such as "æ", "ø" and "å", as it uses the default tokenizer of [microsoft/speecht5_tts](https://huggingface.co/microsoft/speecht5_tts). The model performs best for short to medium length input text and expects input text to contain no more than 600 vocabulary tokens. Additionally, for best performance the model should be given a danish speaker embedding, ideally generated from an audio clip from the training split of [alexandrainst/nst-da](https://huggingface.co/datasets/alexandrainst/nst-da) using [speechbrain/spkrec-xvect-voxceleb](https://huggingface.co/speechbrain/spkrec-xvect-voxceleb).
33
+
34
+ The output of the model is a log-mel spectogram, which should be converted to a waveform using [microsoft/speecht5_hifigan](https://huggingface.co/microsoft/speecht5_hifigan). For better quality output the resulting waveform can be enhanced using [ResembleAI/resemble-enhance](https://huggingface.co/ResembleAI/resemble-enhance).
35
+
36
+ An example script showing how to use the model for inference can be found [here](https://github.com/JackismyShephard/hugging-face-audio-course/blob/main/finetuned_nst-da-inference.ipynb).
37
+
38
+
39
+ ## Training and evaluation data
40
+
41
+ The model was trained and evaluated on [alexandrainst/nst-da](https://huggingface.co/datasets/alexandrainst/nst-da) using MSE as both loss and metric.
42
+
43
+ ## Training procedure
44
+
45
+ The script used for training the model can be found [here](https://github.com/JackismyShephard/hugging-face-audio-course/blob/main/finetuned-nst-da-training.ipynb)
46
+
47
+ ### Training hyperparameters
48
+
49
+ The following hyperparameters were used during training:
50
+ - learning_rate: 1e-05
51
+ - train_batch_size: 32
52
+ - eval_batch_size: 32
53
+ - seed: 42
54
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
55
+ - lr_scheduler_type: linear
56
+ - lr_scheduler_warmup_ratio: 0.1
57
+ - num_epochs: 20
58
+ - mixed_precision_training: Native AMP
59
+
60
+ ### Training results
61
+
62
+ | Training Loss | Epoch | Step | Validation Loss |
63
+ |:-------------:|:-----:|:-----:|:---------------:|
64
+ | 0.463 | 1.0 | 4715 | 0.4169 |
65
+ | 0.4302 | 2.0 | 9430 | 0.3963 |
66
+ | 0.447 | 3.0 | 14145 | 0.3883 |
67
+ | 0.4283 | 4.0 | 18860 | 0.3847 |
68
+ | 0.394 | 5.0 | 23575 | 0.3830 |
69
+ | 0.3934 | 6.0 | 28290 | 0.3812 |
70
+ | 0.3928 | 7.0 | 33005 | 0.3795 |
71
+ | 0.4123 | 8.0 | 37720 | 0.3781 |
72
+ | 0.3851 | 9.0 | 42435 | 0.3785 |
73
+ | 0.4234 | 10.0 | 47150 | 0.3783 |
74
+ | 0.3781 | 11.0 | 51865 | 0.3759 |
75
+ | 0.3951 | 12.0 | 56580 | 0.3782 |
76
+ | 0.4073 | 13.0 | 61295 | 0.3757 |
77
+ | 0.4278 | 14.0 | 66010 | 0.3768 |
78
+ | 0.4172 | 15.0 | 70725 | 0.3747 |
79
+ | 0.3854 | 16.0 | 75440 | 0.3753 |
80
+ | 0.4876 | 17.0 | 80155 | 0.3741 |
81
+ | 0.432 | 18.0 | 84870 | 0.3738 |
82
+ | 0.4435 | 19.0 | 89585 | 0.3745 |
83
+ | 0.4255 | 20.0 | 94300 | 0.3739 |
84
+
85
+
86
+ ### Framework versions
87
+
88
+ - Transformers 4.37.0.dev0
89
+ - Pytorch 2.1.2+cu118
90
+ - Datasets 2.15.0
91
+ - Tokenizers 0.15.0
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "<ctc_blank>": 80,
3
+ "<mask>": 79
4
+ }
config.json ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/speecht5_tts",
3
+ "activation_dropout": 0.1,
4
+ "apply_spec_augment": true,
5
+ "architectures": [
6
+ "SpeechT5ForTextToSpeech"
7
+ ],
8
+ "attention_dropout": 0.1,
9
+ "bos_token_id": 0,
10
+ "conv_bias": false,
11
+ "conv_dim": [
12
+ 512,
13
+ 512,
14
+ 512,
15
+ 512,
16
+ 512,
17
+ 512,
18
+ 512
19
+ ],
20
+ "conv_kernel": [
21
+ 10,
22
+ 3,
23
+ 3,
24
+ 3,
25
+ 3,
26
+ 2,
27
+ 2
28
+ ],
29
+ "conv_stride": [
30
+ 5,
31
+ 2,
32
+ 2,
33
+ 2,
34
+ 2,
35
+ 2,
36
+ 2
37
+ ],
38
+ "decoder_attention_heads": 12,
39
+ "decoder_ffn_dim": 3072,
40
+ "decoder_layerdrop": 0.1,
41
+ "decoder_layers": 6,
42
+ "decoder_start_token_id": 2,
43
+ "encoder_attention_heads": 12,
44
+ "encoder_ffn_dim": 3072,
45
+ "encoder_layerdrop": 0.1,
46
+ "encoder_layers": 12,
47
+ "encoder_max_relative_position": 160,
48
+ "eos_token_id": 2,
49
+ "feat_extract_activation": "gelu",
50
+ "feat_extract_norm": "group",
51
+ "feat_proj_dropout": 0.0,
52
+ "guided_attention_loss_num_heads": 2,
53
+ "guided_attention_loss_scale": 10.0,
54
+ "guided_attention_loss_sigma": 0.4,
55
+ "hidden_act": "gelu",
56
+ "hidden_dropout": 0.1,
57
+ "hidden_size": 768,
58
+ "initializer_range": 0.02,
59
+ "is_encoder_decoder": true,
60
+ "layer_norm_eps": 1e-05,
61
+ "mask_feature_length": 10,
62
+ "mask_feature_min_masks": 0,
63
+ "mask_feature_prob": 0.0,
64
+ "mask_time_length": 10,
65
+ "mask_time_min_masks": 2,
66
+ "mask_time_prob": 0.05,
67
+ "max_length": 1876,
68
+ "max_speech_positions": 1876,
69
+ "max_text_positions": 600,
70
+ "model_type": "speecht5",
71
+ "num_conv_pos_embedding_groups": 16,
72
+ "num_conv_pos_embeddings": 128,
73
+ "num_feat_extract_layers": 7,
74
+ "num_mel_bins": 80,
75
+ "pad_token_id": 1,
76
+ "positional_dropout": 0.1,
77
+ "reduction_factor": 2,
78
+ "scale_embedding": false,
79
+ "speaker_embedding_dim": 512,
80
+ "speech_decoder_postnet_dropout": 0.5,
81
+ "speech_decoder_postnet_kernel": 5,
82
+ "speech_decoder_postnet_layers": 5,
83
+ "speech_decoder_postnet_units": 256,
84
+ "speech_decoder_prenet_dropout": 0.5,
85
+ "speech_decoder_prenet_layers": 2,
86
+ "speech_decoder_prenet_units": 256,
87
+ "torch_dtype": "float32",
88
+ "transformers_version": "4.37.0.dev0",
89
+ "use_cache": false,
90
+ "use_guided_attention_loss": true,
91
+ "vocab_size": 81
92
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 0,
4
+ "decoder_start_token_id": 2,
5
+ "eos_token_id": 2,
6
+ "max_length": 1876,
7
+ "pad_token_id": 1,
8
+ "transformers_version": "4.37.0.dev0"
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fd7115b5fd692e5b4e818cec73302c5178be23b813a6666edfc2e62bb6b3365
3
+ size 577789320
preprocessor_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": false,
3
+ "feature_extractor_type": "SpeechT5FeatureExtractor",
4
+ "feature_size": 1,
5
+ "fmax": 7600,
6
+ "fmin": 80,
7
+ "frame_signal_scale": 1.0,
8
+ "hop_length": 16,
9
+ "mel_floor": 1e-10,
10
+ "num_mel_bins": 80,
11
+ "padding_side": "right",
12
+ "padding_value": 0.0,
13
+ "processor_class": "SpeechT5Processor",
14
+ "reduction_factor": 2,
15
+ "return_attention_mask": true,
16
+ "sampling_rate": 16000,
17
+ "win_function": "hann_window",
18
+ "win_length": 64
19
+ }
runs/Jan14_01-59-01_Christians-Desktop/events.out.tfevents.1705193943.Christians-Desktop.157984.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b8efe0d0f024486a3b0b73b5c1b4e7bce006958d43be54ee95e609461f1c6fa
3
+ size 2263807
runs/Jan14_01-59-01_Christians-Desktop/events.out.tfevents.1705281827.Christians-Desktop.157984.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c977686d449c8a0bc10d6de559a807799b3f699db62037bafacaab0c36a85700
3
+ size 364
runs/Jan15_09-07-38_Christians-Desktop/events.out.tfevents.1705306078.Christians-Desktop.157984.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f3d84c4307cb86f619288832906f710c7610f61781d26c0fc8c26ec132c12db
3
+ size 762165
runs/Jan15_09-07-38_Christians-Desktop/events.out.tfevents.1705367613.Christians-Desktop.157984.3 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e8960e4c085032fb63151881c6a320a53e81bfd578b6deabdab9b29c1556981
3
+ size 364
special_tokens_map.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "eos_token": "</s>",
4
+ "mask_token": {
5
+ "content": "<mask>",
6
+ "lstrip": true,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false
10
+ },
11
+ "pad_token": "<pad>",
12
+ "unk_token": "<unk>"
13
+ }
spm_char.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fcc48f3e225f627b1641db410ceb0c8649bd2b0c982e150b03f8be3728ab560
3
+ size 238473
tokenizer_config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "79": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": true,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "80": {
44
+ "content": "<ctc_blank>",
45
+ "lstrip": false,
46
+ "normalized": true,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": false
50
+ }
51
+ },
52
+ "bos_token": "<s>",
53
+ "clean_up_tokenization_spaces": true,
54
+ "eos_token": "</s>",
55
+ "mask_token": "<mask>",
56
+ "model_max_length": 600,
57
+ "normalize": false,
58
+ "pad_token": "<pad>",
59
+ "processor_class": "SpeechT5Processor",
60
+ "sp_model_kwargs": {},
61
+ "tokenizer_class": "SpeechT5Tokenizer",
62
+ "unk_token": "<unk>"
63
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ab472663086f916e33cf2c755647d5168c72207604e204f721d54f6d82a7734
3
+ size 4920