Sigurdur commited on
Commit
f29e4fc
verified
1 Parent(s): 8133b2b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +49 -40
README.md CHANGED
@@ -1,12 +1,20 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
4
  ---
5
 
6
  # Model Card for Model ID
7
 
8
  <!-- Provide a quick summary of what the model is/does. -->
9
 
 
 
10
 
11
 
12
  ## Model Details
@@ -17,43 +25,59 @@ tags: []
17
 
18
  This is the model card of a 馃 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
  - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
  ## Uses
37
 
38
  <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
 
 
 
40
  ### Direct Use
41
 
42
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
44
- [More Information Needed]
 
 
 
45
 
46
- ### Downstream Use [optional]
 
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
 
50
- [More Information Needed]
 
 
51
 
52
- ### Out-of-Scope Use
 
 
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
 
55
 
56
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  ## Bias, Risks, and Limitations
59
 
@@ -67,32 +91,17 @@ This is the model card of a 馃 transformers model that has been pushed on the
67
 
68
  Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
 
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
  ### Training Data
79
 
80
  <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
 
82
  [More Information Needed]
83
 
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
 
92
 
93
  #### Training Hyperparameters
94
 
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
 
97
  #### Speeds, Sizes, Times [optional]
98
 
@@ -190,10 +199,10 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
190
 
191
  [More Information Needed]
192
 
193
- ## Model Card Authors [optional]
194
 
195
- [More Information Needed]
196
 
197
  ## Model Card Contact
198
 
199
- [More Information Needed]
 
1
  ---
2
  library_name: transformers
3
+ datasets:
4
+ - Sigurdur/talromur-rosa
5
+ language:
6
+ - is
7
+ base_model:
8
+ - facebook/mms-tts
9
+ pipeline_tag: text-to-speech
10
  ---
11
 
12
  # Model Card for Model ID
13
 
14
  <!-- Provide a quick summary of what the model is/does. -->
15
 
16
+ This is a text-to-speach model for Icelandic, it is finetuned from ``facebook/mms-tts-isl`` with the dataset Talr贸mur (see https://repository.clarin.is/repository/xmlui/handle/20.500.12537/330)
17
+
18
 
19
 
20
  ## Model Details
 
25
 
26
  This is the model card of a 馃 transformers model that has been pushed on the Hub. This model card has been automatically generated.
27
 
28
+ - **Developed by:** Sigurdur Haukur Birgisson
29
+ - **Model type:** [VITS](https://huggingface.co/docs/transformers/model_doc/vits)
30
+ - **Language(s) (NLP):** Icelandic, isl
 
 
31
  - **License:** [More Information Needed]
32
+ - **Finetuned from model:** [facebook/mms-tts-isl](https://huggingface.co/facebook/mms-tts-isl)
 
 
 
 
33
 
 
 
 
34
 
35
  ## Uses
36
 
37
  <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
38
 
39
+ This model should be used for text-to-speach applications for Icelandic.
40
+
41
  ### Direct Use
42
 
43
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
44
 
45
+ ```py
46
+ from transformers import VitsModel, AutoTokenizer
47
+ import scipy.io.wavfile as wav
48
+ import torch
49
 
50
+ model = VitsModel.from_pretrained("Sigurdur/vits_icelandic_rosa_female_monospeaker")
51
+ tokenizer = AutoTokenizer.from_pretrained("Sigurdur/vits_icelandic_rosa_female_monospeaker")
52
 
53
+ text = "G贸冒an daginn! 脡g heiti R贸sa, 茅g er talgervill"
54
 
55
+ inputs = tokenizer(text, return_tensors="pt")
56
+ with torch.no_grad():
57
+ output = model(**inputs).waveform
58
 
59
+ sampling_rate = getattr(sampling_rate, "sampling_rate", 16000) # Default to 16kHz if not set
60
+ if not (0 <= sampling_rate <= 65535):
61
+ raise ValueError(f"Invalid sampling rate: {sampling_rate}")
62
 
63
+ waveform = output.squeeze().cpu().numpy() # Remove batch dimension if present
64
+ ```
65
 
66
+ To save output to file
67
+
68
+ ```py
69
+
70
+ wav.write("output.wav", rate=sampling_rate, data=waveform)
71
+ ```
72
+
73
+ To view in jupyter notebook
74
+
75
+ ```py
76
+ from IPython.display import Audio
77
+
78
+ # show audio player for "output.wav"
79
+ Audio(output, rate=sampling_rate)
80
+ ```
81
 
82
  ## Bias, Risks, and Limitations
83
 
 
91
 
92
  Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
93
 
 
 
 
 
 
 
 
 
94
  ### Training Data
95
 
96
  <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
97
 
98
  [More Information Needed]
99
 
 
 
 
 
 
 
 
100
 
101
 
102
  #### Training Hyperparameters
103
 
104
+ - **Training regime:** fp16 <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
105
 
106
  #### Speeds, Sizes, Times [optional]
107
 
 
199
 
200
  [More Information Needed]
201
 
202
+ ## Model Card Authors
203
 
204
+ Sigurdur Haukur Birgisson
205
 
206
  ## Model Card Contact
207
 
208
+ Feel free to contact me through Linkedin: [Sigurdur Haukur Birgisson](https://www.linkedin.com/in/sigurdur-haukur-birgisson/)