waeluf
/

Text-to-Speech
Safetensors
Arabic
vits
waeluf wasmdashai commited on
Commit
c43600a
·
0 Parent(s):

Duplicate from wasmdashai/vits-ar

Browse files

Co-authored-by: Anas Al-Tawil <wasmdashai@users.noreply.huggingface.co>

.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,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - mozilla-foundation/common_voice_17_0
4
+ - wasmdashai/db-arabic-f1-nn
5
+ language:
6
+ - ar
7
+ license: afl-3.0
8
+ pipeline_tag: text-to-speech
9
+ ---
10
+ # Model Card for Model ID
11
+
12
+
13
+ ## Model Details
14
+
15
+ ### Model Description
16
+
17
+ <!-- Provide a longer summary of what this model is. -->
18
+
19
+ An advanced text-to-speech (TTS) system specifically designed for the Arabic language, built on the VITS architecture and utilizing the pre-trained weights from Facebook's vits ara model. The model is capable of:
20
+
21
+ Generating natural and realistic speech: Producing high-quality Arabic speech that closely mimics human voices, preserving intonation and linguistic nuances.
22
+ Understanding colloquial text: Processing text written in various Arabic dialects, including idiomatic expressions and local vocabulary.
23
+
24
+ Model Details
25
+ VITS (Variational Inference with adversarial learning for end-to-end Text-to-Speech) is an end-to-end speech synthesis model that predicts a speech waveform conditional on an input text sequence. It is a conditional variational autoencoder (VAE) comprised of a posterior encoder, decoder, and conditional prior.
26
+
27
+ A set of spectrogram-based acoustic features are predicted by the flow-based module, which is formed of a Transformer-based text encoder and multiple coupling layers. The spectrogram is decoded using a stack of transposed convolutional layers, much in the same style as the HiFi-GAN vocoder. Motivated by the one-to-many nature of the TTS problem, where the same text input can be spoken in multiple ways, the model also includes a stochastic duration predictor, which allows the model to synthesise speech with different rhythms from the same input text.
28
+
29
+ ## Usage
30
+
31
+ MMS-TTS is available in the 🤗 Transformers library from version 4.33 onwards. To use this checkpoint,
32
+ first install the latest version of the library:
33
+
34
+ ```
35
+ pip install transformers[torch]
36
+ ```
37
+
38
+ Then, run inference with the following code-snippet:
39
+
40
+ ```python
41
+ from transformers import VitsModel, AutoTokenizer
42
+ import torch
43
+
44
+ model = VitsModel.from_pretrained("wasmdashai/vits-ar")
45
+ tokenizer = AutoTokenizer.from_pretrained("wasmdashai/vits-ar")
46
+
47
+ text = "السلام عليكم ورحمة الله وبركاتة ما الجديد ؟ "
48
+ inputs = tokenizer(text, return_tensors="pt")
49
+
50
+ with torch.no_grad():
51
+ full_generation =model(**inputs)
52
+ full_generation_waveform = full_generation.waveform.cpu().numpy().reshape(-1)
53
+
54
+ from IPython.display import Audio
55
+
56
+ Audio(full_generation_waveform, rate=model.config.sampling_rate)
57
+
58
+ ```
59
+
60
+ ## Contact
61
+ You can also email us at modelasg@gmail.com
62
+
63
+
64
+
65
+ ## مجموعة نماذج توليد اللهجات العربية
66
+
67
+ ### مقدمة
68
+
69
+ يسرنا أن نعلن عن إصدار مجموعة من نماذج توليد اللهجات العربية قريبًا. تم تصميم هذه النماذج باستخدام تقنيات الذكاء الاصطناعي المتقدمة لتقديم تجربة طبيعية وواقعية في تحويل النص إلى كلام (Text-to-Speech) بمختلف اللهجات العربية.
70
+
71
+ ### جدول النماذج
72
+ | **اللهجة** | **اسم النموذج** | **الوصف** | **تاريخ الإصدار المتوقع** | **مستوى جودة الصوت** |
73
+ |-------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------|----------------------------|----------------------|
74
+ | اللغة العربية | [vits-ar](https://huggingface.co/wasmdashai/vits-ar) | نموذج لتحويل النص إلى كلام باللهجة اليمنية بتفاصيل دقيقة. | متوفر | متوسط |
75
+ | اللهجة اليمنية | [vits-ar-ye](https://huggingface.co/wasmdashai/vits-ar-ye) | نموذج لتحويل النص إلى كلام باللهجة اليمنية بتفاصيل دقيقة. | قريباً | متوسط |
76
+ | اللهجة السعودية | [vits-ar-sa](https://huggingface.co/wasmdashai/vits-ar-sa-huba) | نموذج لتحويل النص إلى كلام باللهجة السعودية بجودة عالية وتفاصيل دقيقة. | متوفر | متوسط |
77
+ | اللهجة المصرية | [vits-ar-eg](https://huggingface.co/wasmdashai/vits-ar-eg) | نموذج لتحويل النص إلى كلام باللهجة المصرية بأسلوب طبيعي وسلس. | قريباً | متوسط |
78
+ | اللهجة اللبنانية | [vits-ar-lb](https://huggingface.co/wasmdashai/vits-ar-lb) | نموذج متخصص في اللهجة اللبنانية لتوليد كل��م بتفاصيل دقيقة وواقعية. | قريباً | متوسط |
79
+ | اللهجة المغربية | [vits-ar-ma](https://huggingface.co/wasmdashai/vits-ar-ma) | نموذج لتحويل النص إلى كلام باللهجة المغربية بقدرة على فهم المصطلحات المحلية.| قريباً | متوسط |
80
+ | اللهجة الإماراتية | [vits-ar-ae](https://huggingface.co/wasmdashai/vits-ar-ae) | نموذج لتحويل النص إلى كلام باللهجة الإماراتية بواقعية وتفاصيل دقيقة. | قريباً | متوسط |
81
+ | اللهجة الأردنية | [vits-ar-jo](https://huggingface.co/wasmdashai/vits-ar-jo) | نموذج لتحويل النص إلى كلام باللهجة الأردنية بإتقان للتفاصيل الصوتية. | قريباً | متوسط |
82
+ | اللهجة العراقية | [vits-ar-iq](https://huggingface.co/wasmdashai/vits-ar-iq) | نموذج لتوليد الكلام باللهجة العراقية بدقة في نطق الكلمات والتعابير الشائعة. | قريباً | متوسط |
83
+ | اللهجة السورية | [vits-ar-sy](https://huggingface.co/wasmdashai/vits-ar-sy) | نموذج لتحويل النص إلى كلام باللهجة السورية بوضوح وصوت طبيعي. | قريباً | متوسط |
84
+ | اللهجة الفلسطينية | [vits-ar-ps](https://huggingface.co/wasmdashai/vits-ar-ps) | نموذج لتحويل النص إلى كلام باللهجة الفلسطينية بتفاصيل دقيقة. | قريباً | متوسط |
85
+ | اللهجة السودانية | [vits-ar-sd](https://huggingface.co/wasmdashai/vits-ar-sd) | نموذج لتحويل النص إلى كلام باللهجة السودانية مع فهم المفردات المحلية. | قريباً | متوسط |
86
+ | اللهجة الجزائرية | [vits-ar-dz](https://huggingface.co/wasmdashai/vits-ar-dz) | نموذج لتحويل النص إلى كلام باللهجة الجزائرية بدقة وجودة عالية. | قريباً | متوسط |
87
+ | اللهجة التونسية | [vits-ar-tn](https://huggingface.co/wasmdashai/vits-ar-tn) | نموذج لتحويل النص إلى كلام باللهجة التونسية بإتقان للتفاصيل المحلية. | قريباً | متوسط |
88
+ | اللهجة الليبية | [vits-ar-ly](https://huggingface.co/wasmdashai/vits-ar-ly) | نموذج لتحويل النص إلى كلام باللهجة الليبية بدقة وواقعية في النطق. | قريباً | متوسط |
89
+ | اللهجة البحرينية | [vits-ar-bh](https://huggingface.co/wasmdashai/vits-ar-bh) | نموذج لتحويل النص إلى كلام باللهجة البحرينية بجودة صوت عالية. | قريباً | متوسط |
90
+ | اللهجة العمانية | [vits-ar-om](https://huggingface.co/wasmdashai/vits-ar-om) | نموذج لتحويل النص إلى كلام باللهجة العمانية بدقة ووضوح في النطق. | قريباً | متوسط |
91
+ | اللهجة القطرية | [vits-ar-qa](https://huggingface.co/wasmdashai/vits-ar-qa) | نموذج لتحويل النص إلى كلام باللهجة القطرية بتفاصيل دقيقة وواقعية. | قريباً | متوسط |
92
+ | اللهجة الكويتية | [vits-ar-kw](https://huggingface.co/wasmdashai/vits-ar-kw) | نموذج لتحويل النص إلى كلام باللهجة الكويتية بجودة عالية ووضوح. | قريباً | متوسط |
93
+ | اللهجة الموريتانية | [vits-ar-mr](https://huggingface.co/wasmdashai/vits-ar-mr) | نموذج لتحويل النص إلى كلام باللهجة الموريتانية بتفاصيل دقيقة وواقعية. | قريباً | متوسط |
94
+
95
+ ### التفاصيل الفنية
96
+
97
+ تعتمد جميع النماذج على بنية VITS، وهي نموذج شامل لتحويل النص إلى كلام يتيح توليد موجات صوتية واقعية بناءً على المدخلات النصية. تحتوي النماذج على محولات لتحليل النص وتوليد الكلام بناءً على خصائص الصوت المحلية لكل لهجة.
98
+
99
+ ### الترقيات المستقبلية
100
+
101
+ سيتم تقديم تحديثات منتظمة لتحسين جودة الصوت وزيادة كفاءة فهم اللهجات المختلفة. تابعونا لمعرفة المزيد حول تواريخ الإطلاق الدقيقة لكل نموذج.
102
+
103
+
104
+
105
+ ## Acknowledgements
106
+
107
+
108
+
109
+ This implementation is based on [tts-arabic](https://github.com/nipponjo/tts-arabic-pytorch), [VITS](https://github.com/jaywalnut310/vits), [Finetune VITS](https://github.com/ylacombe/finetune-hf-vits) and [Bert-VITS2](https://github.com/fishaudio/Bert-VITS2). We appreciate their awesome work.
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<unk>": 39
3
+ }
config.json ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/content/drive/MyDrive/TRUBO-Huba/arabic/v1",
3
+ "activation_dropout": 0.1,
4
+ "architectures": [
5
+ "VitsModel"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "depth_separable_channels": 2,
9
+ "depth_separable_num_layers": 3,
10
+ "discriminator_kernel_size": 5,
11
+ "discriminator_period_channels": [
12
+ 1,
13
+ 32,
14
+ 128,
15
+ 512,
16
+ 1024
17
+ ],
18
+ "discriminator_periods": [
19
+ 2,
20
+ 3,
21
+ 5,
22
+ 7,
23
+ 11
24
+ ],
25
+ "discriminator_scale_channels": [
26
+ 1,
27
+ 16,
28
+ 64,
29
+ 256,
30
+ 1024
31
+ ],
32
+ "discriminator_stride": 3,
33
+ "duration_predictor_dropout": 0.5,
34
+ "duration_predictor_filter_channels": 256,
35
+ "duration_predictor_flow_bins": 10,
36
+ "duration_predictor_kernel_size": 3,
37
+ "duration_predictor_num_flows": 4,
38
+ "duration_predictor_tail_bound": 5.0,
39
+ "ffn_dim": 768,
40
+ "ffn_kernel_size": 3,
41
+ "flow_size": 192,
42
+ "hidden_act": "relu",
43
+ "hidden_dropout": 0.1,
44
+ "hidden_size": 192,
45
+ "hop_length": 256,
46
+ "initializer_range": 0.02,
47
+ "layer_norm_eps": 1e-05,
48
+ "layerdrop": 0.1,
49
+ "leaky_relu_slope": 0.1,
50
+ "model_type": "vits",
51
+ "noise_scale": 0.667,
52
+ "noise_scale_duration": 0.8,
53
+ "num_attention_heads": 2,
54
+ "num_hidden_layers": 6,
55
+ "num_speakers": 1,
56
+ "posterior_encoder_num_wavenet_layers": 16,
57
+ "prior_encoder_num_flows": 4,
58
+ "prior_encoder_num_wavenet_layers": 4,
59
+ "resblock_dilation_sizes": [
60
+ [
61
+ 1,
62
+ 3,
63
+ 5
64
+ ],
65
+ [
66
+ 1,
67
+ 3,
68
+ 5
69
+ ],
70
+ [
71
+ 1,
72
+ 3,
73
+ 5
74
+ ]
75
+ ],
76
+ "resblock_kernel_sizes": [
77
+ 3,
78
+ 7,
79
+ 11
80
+ ],
81
+ "sampling_rate": 16000,
82
+ "segment_size": 8192,
83
+ "speaker_embedding_size": 0,
84
+ "speaking_rate": 1.0,
85
+ "spectrogram_bins": 513,
86
+ "torch_dtype": "float32",
87
+ "transformers_version": "4.42.4",
88
+ "upsample_initial_channel": 512,
89
+ "upsample_kernel_sizes": [
90
+ 16,
91
+ 16,
92
+ 4,
93
+ 4
94
+ ],
95
+ "upsample_rates": [
96
+ 8,
97
+ 8,
98
+ 2,
99
+ 2
100
+ ],
101
+ "use_bias": true,
102
+ "use_stochastic_duration_prediction": true,
103
+ "vocab_size": 39,
104
+ "wavenet_dilation_rate": 1,
105
+ "wavenet_dropout": 0.0,
106
+ "wavenet_kernel_size": 5,
107
+ "window_size": 4
108
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f8b6c437bc5b5f157a15254a9934554943e08d6ccfd633d8fe777803c5bc9a4
3
+ size 145231480
special_tokens_map.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "pad_token": "ا",
3
+ "unk_token": "<unk>"
4
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_blank": true,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "ا",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "39": {
13
+ "content": "<unk>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ }
20
+ },
21
+ "clean_up_tokenization_spaces": true,
22
+ "is_uroman": false,
23
+ "language": "ara",
24
+ "model_max_length": 1000000000000000019884624838656,
25
+ "normalize": true,
26
+ "pad_token": "ا",
27
+ "phonemize": false,
28
+ "tokenizer_class": "VitsTokenizer",
29
+ "unk_token": "<unk>"
30
+ }
vocab.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ " ": 25,
3
+ "_": 37,
4
+ "ء": 26,
5
+ "آ": 27,
6
+ "أ": 20,
7
+ "ؤ": 35,
8
+ "إ": 4,
9
+ "ئ": 38,
10
+ "ا": 0,
11
+ "ب": 28,
12
+ "ة": 7,
13
+ "ت": 12,
14
+ "ث": 19,
15
+ "ج": 13,
16
+ "ح": 23,
17
+ "خ": 11,
18
+ "د": 16,
19
+ "ذ": 6,
20
+ "ر": 9,
21
+ "ز": 34,
22
+ "س": 8,
23
+ "ش": 32,
24
+ "ص": 18,
25
+ "ض": 22,
26
+ "ط": 10,
27
+ "ظ": 14,
28
+ "ع": 3,
29
+ "غ": 5,
30
+ "ف": 36,
31
+ "ق": 33,
32
+ "ك": 2,
33
+ "ل": 31,
34
+ "م": 30,
35
+ "ن": 1,
36
+ "ه": 24,
37
+ "و": 29,
38
+ "ى": 21,
39
+ "ي": 15,
40
+ "–": 17
41
+ }