Interactive labs for speech recognition, speech synthesis, and audio in general: in-browser DSP experiments, algorithms, datasets, and a learning path, without storing any recording.
Neural Speech Synthesis
Neural TTS
Run an external open-license neural TTS model and evaluate its outputs by listening and with objective metrics, noting that MOS requires listeners.
Educational content in the form of a scientific draft that needs expert review before being adopted as an academic reference. No experimental result that was not actually run is shown here.
Prerequisites
- An open TTS model that supports the text language, with its license reviewed
- Python with transformers, torch and soundfile
- Listeners to rate MOS, if desired
Tools
- text-to-speech
- spectrogram-explorer
- pitch-energy
Implementation Steps
- Choose a model and document its license and languages
- Normalize the text (numbers and abbreviations)
- Generate the audio
- Save the waveform and display the spectrogram
- Compare pitch and duration with a reference sentence
- Organize a listening test with human listeners to measure MOS
- Disclose that the audio is machine-generated
Code
from transformers import pipeline
import soundfile as sf
# Choose a model that supports your language and review its license
tts = pipeline("text-to-speech", model="MODEL_ID")
out = tts("Hello world")
sf.write("out.wav", out["audio"].squeeze(), out["sampling_rate"])Expected Results
Audio clarity and naturalness are expected to differ by model and language, and MOS should be relied on only after a structured human evaluation.
These are educational expectations and not experimental results actually measured.
Project Tests
- Compare the output on difficult sentences containing numbers and names
- Estimate intelligibility by running ASR on the output, taking its bias into account
- Run a listening test with human listeners to measure MOS
Algorithms
Experiments
References
- Shen et al.. Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions. arXiv (2017). DOI
- Ren et al.. FastSpeech 2: Fast and High-Quality End-to-End Text to Speech. arXiv (2020). DOI
- Kim et al.. Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech. arXiv (2021). DOI
- Kong et al.. HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis. arXiv (2020). DOI
- Ao et al.. SpeechT5: Unified-Modal Encoder-Decoder Pre-Training for Spoken Language Processing. arXiv (2021). DOI
Audio processing in the experiments takes place inside your browser. Audio, texts, and conversations are not saved on the server. Privacy Policy
