Adding information to the "about" section

#1
Files changed (1) hide show
  1. infer_onnx.py +240 -21
infer_onnx.py CHANGED
@@ -194,37 +194,256 @@ For vocoders we use [Vocos](https://huggingface.co/BSC-LT/vocos-mel-22khz-cat) t
194
 
195
  about = """
196
  ## 📄 About
197
- The TTS test about.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
 
199
  ## Samples
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
 
201
  <table style="font-size:16px">
202
  <col width="205">
203
  <col width="205">
204
  <thead>
205
  <tr>
206
- <td>Col1</td>
207
- <td>Col2</td>
208
- <td>Col3</td>
209
  </tr>
210
  </thead>
211
- <tbody>
212
- <tr>
213
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-3s.mp3"></audio></td>
214
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-6s.mp3"></audio></td>
215
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-9s.mp3"></audio></td>
216
- </tr>
217
- <tr>
218
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-3s.mp3"></audio></td>
219
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-6s.mp3"></audio></td>
220
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-9s.mp3"></audio></td>
221
- </tr>
222
- <tr>
223
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-3s.mp3"></audio></td>
224
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-6s.mp3"></audio></td>
225
- <td><audio controls="" preload="none" style="width: 200px">audio not supported<source src="https://samplelib.com/lib/preview/mp3/sample-9s.mp3"></audio></td>
226
- </tr>
227
- </tbody></table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  """
229
 
230
  article = "Training and demo by The Language Technologies Unit from Barcelona Supercomputing Center."
 
194
 
195
  about = """
196
  ## 📄 About
197
+ Natural and efficient TTS in Catalan: using Matcha-TTS with the Catalan language.
198
+
199
+ Here you'll be able to find all the information regarding our model, which has been trained with the use of deep learning. If you want specific information on how to train the model you can find it [here](https://huggingface.co/BSC-LT/matcha-tts-cat-multispeaker). The code we've used is also on Github [here](https://github.com/langtech-bsc/Matcha-TTS/tree/dev-cat).
200
+
201
+ ## Table of Contents
202
+ <details>
203
+ <summary>Click to expand</summary>
204
+
205
+ - [General Model Description](#general-model-description)
206
+ - [Adaptation to Catalan](#adaptation-to-catalan)
207
+ - [Intended Uses and Limitations](#intended-uses-and-limitations)
208
+ - [Samples](#samples)
209
+ - [Citation](#citation)
210
+ - [Additional Information](#additional-information)
211
+
212
+ </details>
213
+
214
+ ## General Model Description
215
+
216
+ **Matcha-TTS** is an encoder-decoder architecture designed for fast acoustic modelling in TTS.
217
+ On the one hand, the encoder part is based on a text encoder and a phoneme duration prediction. Together, they predict averaged acoustic features.
218
+ On the other hand, the decoder has essentially a U-Net backbone inspired by [Grad-TTS](https://arxiv.org/pdf/2105.06337.pdf), which is based on the Transformer architecture.
219
+ In the latter, by replacing 2D CNNs by 1D CNNs, a large reduction in memory consumption and fast synthesis is achieved.
220
+
221
+ **Matcha-TTS** is a non-autorregressive model trained with optimal-transport conditional flow matching (OT-CFM).
222
+ This yields an ODE-based decoder capable of generating high output quality in fewer synthesis steps than models trained using score matching.
223
+
224
+ ## Adaptation to Catalan
225
+
226
+ The original Matcha-TTS model excels in English, but to bring its capabilities to Catalan, a multi-step process was undertaken. Firstly, we fine-tuned the model from English to Catalan central, which laid the groundwork for understanding the language's nuances. This first fine-tuning was done using two datasets:
227
+
228
+ * [Our version of the openslr-slr69 dataset.](https://huggingface.co/datasets/projecte-aina/openslr-slr69-ca-trimmed-denoised)
229
+
230
+ * A studio-recorded dataset of central catalan, which will soon be published.
231
+
232
+ This soon to be published dataset also included recordings of three different dialects:
233
+
234
+ * Valencian
235
+
236
+ * Occidental
237
+
238
+ * Balear
239
+
240
+ With a male and a female speaker for each dialect.
241
+
242
+ Then, through fine-tuning for these specific Catalan dialects, the model adapted to regional variations in pronunciation and cadence. This meticulous approach ensures that the model reflects the linguistic richness and cultural diversity within the Catalan-speaking community, offering seamless communication in previously underserved dialects.
243
+
244
+ In addition to training the Matcha-TTS model for Catalan, integrating the eSpeak phonemizer played a crucial role in enhancing the naturalness and accuracy of generated speech. A TTS (Text-to-Speech) system comprises several components, each contributing to the overall quality of synthesized speech. The first component involves text preprocessing, where the input text undergoes normalization and linguistic analysis to identify words, punctuation, and linguistic features. Next, the text is converted into phonemes, the smallest units of sound in a language, through a process called phonemization. This step is where the eSpeak phonemizer shines, as it accurately converts Catalan text into phonetic representations, capturing the subtle nuances of pronunciation specific to Catalan. You can find the espeak version we used [here](https://github.com/projecte-aina/espeak-ng/tree/dev-ca).
245
+
246
+ After phonemization, the phonemes are passed to the synthesis component, where they are transformed into audible speech. Here, the Matcha-TTS model takes center stage, generating high-quality speech output based on the phonetic input. The model's training, fine-tuning, and adaptation to Catalan ensure that the synthesized speech retains the natural rhythm, intonation, and pronunciation patterns of the language, thereby enhancing the overall user experience.
247
+
248
+ Finally, the synthesized speech undergoes post-processing, where prosodic features such as pitch, duration, and emphasis are applied to further refine the output and make it sound more natural and expressive. By integrating the eSpeak phonemizer into the TTS pipeline and adapting it for Catalan, alongside training the Matcha-TTS model for the language, we have created a comprehensive and effective system for generating high-quality Catalan speech. This combination of advanced techniques and meticulous attention to linguistic detail is instrumental in bridging language barriers and facilitating communication for Catalan speakers worldwide.
249
+
250
+ ## Intended Uses and Limitations
251
+
252
+ This model is intended to serve as an acoustic feature generator for multispeaker text-to-speech systems for the Catalan language.
253
+ It has been finetuned using a Catalan phonemizer, therefore if the model is used for other languages it may will not produce intelligible samples after mapping
254
+ its output into a speech waveform.
255
+
256
+ The quality of the samples can vary depending on the speaker.
257
+ This may be due to the sensitivity of the model in learning specific frequencies and also due to the quality of samples for each speaker.
258
+
259
+
260
+
261
 
262
  ## Samples
263
+ * Female samples
264
+
265
+ <table style="font-size:16px">
266
+ <col width="205">
267
+ <col width="205">
268
+ <td>Valencian</td>
269
+ <td>Occidental</td>
270
+ <td>Balear</td>
271
+ <tbody
272
+ <table>
273
+ <tbody>
274
+ <tr>
275
+ <td>
276
+ <audio controls="" preload="none" style="width: 200px">
277
+ audio not supported
278
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/valencia/spk1/0.wav" type="audio/wav">
279
+ </audio>
280
+ </td>
281
+ <td>
282
+ <audio controls="" preload="none" style="width: 200px">
283
+ audio not supported
284
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/occidental/spk1/0.wav" type="audio/wav"">
285
+ </audio>
286
+ </td>
287
+ <td>
288
+ <audio controls="" preload="none" style="width: 200px">
289
+ audio not supported
290
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/balear/spk1/0.wav" type="audio/wav">
291
+ </audio>
292
+ </td>
293
+ </tr>
294
+ <tr>
295
+ <td>
296
+ <audio controls="" preload="none" style="width: 200px">
297
+ audio not supported
298
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/valencia/spk1/1.wav" type="audio/wav">
299
+ </audio>
300
+ </td>
301
+ <td>
302
+ <audio controls="" preload="none" style="width: 200px">
303
+ audio not supported
304
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/occidental/spk1/1.wav" type="audio/wav">
305
+ </audio>
306
+ </td>
307
+ <td>
308
+ <audio controls="" preload="none" style="width: 200px">
309
+ audio not supported
310
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/balear/spk1/1.wav" type="audio/wav">
311
+ </audio>
312
+ </td>
313
+ </tr>
314
+ <tr>
315
+ <td>
316
+ <audio controls="" preload="none" style="width: 200px">
317
+ audio not supported
318
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/valencia/spk1/2.wav" type="audio/wav">
319
+ </audio>
320
+ </td>
321
+ <td>
322
+ <audio controls="" preload="none" style="width: 200px">
323
+ audio not supported
324
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/occidental/spk1/2.wav" type="audio/wav">
325
+ </audio>
326
+ </td>
327
+ <td>
328
+ <audio controls="" preload="none" style="width: 200px">
329
+ audio not supported
330
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/balear/spk1/2.wav" type="audio/wav">
331
+ </audio>
332
+ </td>
333
+ </tr>
334
+ </tbody>
335
+ </table>
336
+
337
+ * Male samples:
338
 
339
  <table style="font-size:16px">
340
  <col width="205">
341
  <col width="205">
342
  <thead>
343
  <tr>
344
+ <td>Valencian</td>
345
+ <td>Occidental</td>
346
+ <td>Balear</td>
347
  </tr>
348
  </thead>
349
+ <tbody
350
+ <table>
351
+ <tbody>
352
+ <tr>
353
+ <td>
354
+ <audio controls="" preload="none" style="width: 200px">
355
+ audio not supported
356
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/valencia/spk0/0.wav" type="audio/wav">
357
+ </audio>
358
+ </td>
359
+ <td>
360
+ <audio controls="" preload="none" style="width: 200px">
361
+ audio not supported
362
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/occidental/spk0/0.wav" type="audio/wav"">
363
+ </audio>
364
+ </td>
365
+ <td>
366
+ <audio controls="" preload="none" style="width: 200px">
367
+ audio not supported
368
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/balear/spk0/0.wav" type="audio/wav">
369
+ </audio>
370
+ </td>
371
+ </tr>
372
+ <tr>
373
+ <td>
374
+ <audio controls="" preload="none" style="width: 200px">
375
+ audio not supported
376
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/valencia/spk0/1.wav" type="audio/wav">
377
+ </audio>
378
+ </td>
379
+ <td>
380
+ <audio controls="" preload="none" style="width: 200px">
381
+ audio not supported
382
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/occidental/spk0/1.wav" type="audio/wav">
383
+ </audio>
384
+ </td>
385
+ <td>
386
+ <audio controls="" preload="none" style="width: 200px">
387
+ audio not supported
388
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/balear/spk0/1.wav" type="audio/wav">
389
+ </audio>
390
+ </td>
391
+ </tr>
392
+ <tr>
393
+ <td>
394
+ <audio controls="" preload="none" style="width: 200px">
395
+ audio not supported
396
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/valencia/spk0/2.wav" type="audio/wav">
397
+ </audio>
398
+ </td>
399
+ <td>
400
+ <audio controls="" preload="none" style="width: 200px">
401
+ audio not supported
402
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/occidental/spk0/2.wav" type="audio/wav">
403
+ </audio>
404
+ </td>
405
+ <td>
406
+ <audio controls="" preload="none" style="width: 200px">
407
+ audio not supported
408
+ <source src="https://github.com/mllopartbsc/assets/raw/c6a393237e712851dd7cc7d10c70dde29d3412ac/matcha_tts_catalan/balear/spk0/2.wav" type="audio/wav">
409
+ </audio>
410
+ </td>
411
+ </tr>
412
+ </tbody>
413
+ </table>
414
+
415
+
416
+ ## Citation
417
+
418
+ If this code contributes to your research, please cite the work:
419
+
420
+ ```
421
+ @misc{mehta2024matchatts,
422
+ title={Matcha-TTS: A fast TTS architecture with conditional flow matching},
423
+ author={Shivam Mehta and Ruibo Tu and Jonas Beskow and Éva Székely and Gustav Eje Henter},
424
+ year={2024},
425
+ eprint={2309.03199},
426
+ archivePrefix={arXiv},
427
+ primaryClass={eess.AS}
428
+ }
429
+ ```
430
+
431
+ ## Additional Information
432
+
433
+ ### Author
434
+ The Language Technologies Unit from Barcelona Supercomputing Center.
435
+
436
+ ### Contact
437
+ For further information, please send an email to <langtech@bsc.es>.
438
+
439
+ ### Copyright
440
+ Copyright(c) 2023 by Language Technologies Unit, Barcelona Supercomputing Center.
441
+
442
+ ### License
443
+ [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
444
+
445
+ ### Funding
446
+ This work has been promoted and financed by the Generalitat de Catalunya through the [Aina project](https://projecteaina.cat/).
447
  """
448
 
449
  article = "Training and demo by The Language Technologies Unit from Barcelona Supercomputing Center."