cdminix commited on
Commit
76cab25
·
1 Parent(s): 8893fce

minor readme fixes, citations

Browse files
Files changed (1) hide show
  1. README.md +35 -2
README.md CHANGED
@@ -71,7 +71,7 @@ from datasets import load_dataset
71
  from speech_collator import SpeechCollator
72
  from torch.utils.data import DataLoader
73
 
74
- dataset = load_dataset('libritts_align', split="train")
75
 
76
  speaker2ixd = json.load(open("speaker2idx.json"))
77
  phone2ixd = json.load(open("phone2idx.json"))
@@ -101,4 +101,37 @@ with open("speaker2idx.json", "w") as f:
101
  json.dump(speaker2idx, f)
102
  with open("phone2idx.json", "w") as f:
103
  json.dump(phone2idx, f)
104
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  from speech_collator import SpeechCollator
72
  from torch.utils.data import DataLoader
73
 
74
+ dataset = load_dataset('cdminix/libritts-aligned', split="train")
75
 
76
  speaker2ixd = json.load(open("speaker2idx.json"))
77
  phone2ixd = json.load(open("phone2idx.json"))
 
101
  json.dump(speaker2idx, f)
102
  with open("phone2idx.json", "w") as f:
103
  json.dump(phone2idx, f)
104
+ ```
105
+
106
+ ### Measures
107
+
108
+ When using ``speech-collator`` you can also use the ``measures`` argument to specify which measures to use. The following example extracts Pitch and Energy on the fly.
109
+
110
+ ```python
111
+ import json
112
+ from datasets import load_dataset
113
+ from speech_collator import SpeechCollator
114
+ from speech_collator.measures import PitchMeasure, EnergyMeasure
115
+ from torch.utils.data import DataLoader
116
+
117
+ dataset = load_dataset('cdminix/libritts-aligned', split="train")
118
+ collator = SpeechCollator(
119
+ speaker2ixd=speaker2idx,
120
+ phone2ixd=phone2idx,
121
+ measures=[PitchMeasure(), EnergyMeasure()],
122
+ return_keys=["pitch", "energy"],
123
+ )
124
+
125
+ dataloader = DataLoader(dataset, collate_fn=collator.collate_fn, batch_size=8)
126
+ ```
127
+
128
+ COMING SOON: Detailed documentation on how to use the measures at [MiniXC/speech-collator](https://www.github.com/MiniXC/speech-collator).
129
+
130
+ # Citation
131
+
132
+ When using LibriTTS please cite the following papers:
133
+ - [LibriTTS: A Corpus Derived from LibriSpeech for Text-to-Speech](https://arxiv.org/abs/1904.02882)
134
+ - [Montreal Forced Aligner: Trainable text-speech alignment using Kaldi](https://www.researchgate.net/publication/319185277_Montreal_Forced_Aligner_Trainable_Text-Speech_Alignment_Using_Kaldi)
135
+
136
+ When using the Measures please cite the following paper (ours):
137
+ - [Evaluating and reducing the distance between synthetic and real speech distributions](https://arxiv.org/abs/2211.16049)