Speech & Audio AI Lab

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.

43experiments

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.

Advanced

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

  1. Choose a model and document its license and languages
  2. Normalize the text (numbers and abbreviations)
  3. Generate the audio
  4. Save the waveform and display the spectrogram
  5. Compare pitch and duration with a reference sentence
  6. Organize a listening test with human listeners to measure MOS
  7. Disclose that the audio is machine-generated

Code

JavaScript / PythonIllustrative, not implemented in testing
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

References

  1. Shen et al.. Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions. arXiv (2017). DOI
  2. Ren et al.. FastSpeech 2: Fast and High-Quality End-to-End Text to Speech. arXiv (2020). DOI
  3. Kim et al.. Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech. arXiv (2021). DOI
  4. Kong et al.. HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis. arXiv (2020). DOI
  5. 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