EditSpeech: A Text Based Speech Editing System Using Partial Inference and Bidirectional Fusion

Daxin Tan, Liqun Deng, Yu Ting Yeung, Xin Jiang, Xiao Chen, Tan Lee

Abstract

EditSpeech is a neural text-to-speech (NTTS) based editing system designed for seamless deletion, insertion, or replacement of words in recorded audio. Unlike traditional splicing or full-sentence regeneration, EditSpeech employs partial inference to maintain the integrity of original audio and bidirectional fusion to ensure smooth transitions. By conditioning the generation of modified segments on neighboring original frames and utilizing both forward and backward decoders, the system preserves the original speaker's prosody and style. Evaluations across multiple datasets demonstrate that EditSpeech significantly outperforms standard TTS baselines in both objective metrics and subjective naturalness.

Introduction

Recording long-form audio—such as podcasts, audiobooks, or tutorials—is rarely a perfect process. Mispronunciations, stutters, or forgotten words often necessitate re-recording entire sections to maintain consistency in tone and pace. Existing automated solutions, such as unit-selection (e.g., VOCO), often produce jarring transitions because they do not account for surrounding context. Conversely, standard TTS systems regenerate the entire sentence, leading to obvious discrepancies in pitch, speed, and emotion when spliced into original recordings. The challenge lies in generating only the modified portion of the speech so that it blends perfectly with the untouched audio.

Methodology

System Overview

EditSpeech builds upon a duration-based Auto-Regressive (AR) NTTS framework. The system allows for precise editing by identifying "non-modify" regions (A and C) and a "to-modify" region (B) which is transformed into the edited region (B').

Overview of the EditSpeech system, illustrating the transition from original text/audio to edited output via a specialized NTTS architecture.

Partial Inference and Bidirectional Fusion

The core innovation of EditSpeech lies in its "surgical" approach to editing:

  • Partial Inference: Instead of regenerating the entire utterance, the system keeps the original mel-spectrogram frames for the unmodified regions. It only generates new frames for the target region, conditioned on the original neighboring frames to ensure contextual consistency.
  • Bidirectional Fusion: To eliminate glitches at boundaries, EditSpeech employs two decoders: a forward decoder (left-to-right) and a backward decoder (right-to-left). The forward decoder ensures a smooth transition from the preceding audio, while the backward decoder does the same for the following audio. The system identifies a "fusion point" where the two generated sequences are most similar (minimizing L2-norm difference) and merges them.
Detailed view of the partial inference process and bidirectional fusion mechanism used to generate the modified region B'.
  • Duration Refinement: To maintain a natural flow, the system scales the predicted duration of new phones based on the speaking rate of the surrounding original audio.
  • Vocoder: A HiFi-GAN vocoder is used to convert the final fused mel-spectrogram back into a high-fidelity audio waveform.

Experimental Setup

The researchers evaluated EditSpeech across four diverse datasets to ensure versatility across languages and speaker counts:

  • LJ-speech: English, single female speaker.
  • VCTK: English, 109 speakers.
  • MST: Chinese, 2 speakers.
  • Aishell-3: Chinese, 218 speakers.

Results and Discussion

Key Insights

  • Contextual Awareness: Feeding original frames into the prenet and decoders during inference allows the model to "learn" the specific prosody of the original recording session.
  • Eliminating the "Tail" Problem: Unidirectional models often accumulate errors toward the end of a sequence. The backward decoder effectively eliminates the "glitchy" transitions at the end of inserted segments.
  • Preservation of Quality: By directly copying original frames for unmodified regions, the system avoids the "uncanny valley" effect associated with full-sentence synthesis.

Performance Metrics

EditSpeech consistently outperformed baselines in both objective and subjective tests:

  • Objective: It achieved the lowest Mel-cepstral distortion (MCD) across all datasets, indicating high mathematical similarity to ground truth recordings.
  • Subjective: In human listening tests (MOS), EditSpeech scored significantly higher for naturalness. On the VCTK dataset, it achieved a MOS of 3.34 for insertions, compared to 2.97 for standard TTS.
  • Preference: ABX tests showed a clear preference for EditSpeech, with a 53.8% preference rate versus 27.1% for full-sentence TTS on the VCTK dataset.

Conclusion

EditSpeech provides a robust solution for high-quality speech editing. While currently dependent on vocoder quality and known speaker identities, it represents a significant step forward in making audio editing as seamless as text editing. Future work will focus on expanding language support and exploring zero-shot editing for unseen speakers.

Summary updated

BibTeX
@inproceedings{tan2021editspeech,
  author = {Daxin Tan and Liqun Deng and Yu Ting Yeung and Xin Jiang and Xiao Chen and Tan Lee},
  title = {{EditSpeech: A Text Based Speech Editing System Using Partial Inference and Bidirectional Fusion}},
  booktitle = {ASRU},
  year = {2021},
  doi = {10.1109/asru51503.2021.9688051},
}
Figure