PaddleSpeech

repository·develop·Indexed 11 days ago

https://github.com/paddlepaddle/paddlespeech

An open-source toolkit on the PaddlePaddle platform for speech and audio tasks, providing state-of-the-art models for recognition, synthesis, and translation. It includes Audiotools for signal processing, support for various speech corpora like AISHELL-3 and GigaSpeech, and features such as Audio Content Search (ACS) for retrieving keyword timestamps from transcribed speech.

Tokens
234.6K
Snippets
754
Records
1.2K
Agent score
92%

What's inside PaddleSpeech

  1. Overview of Paddle Speech Demo

    develop

    Paddle Speech Demo is a showcase project designed to help users get started with PaddleSpeech and build their own applications. It integrates speech interaction via PaddleSpeech, dialogue and information extraction via PaddleNLP, and a web frontend based on Vue3.

    Core Functionalities:

    Via main.py:

    • Voice Chat: Combines PaddleSpeech ASR (Speech Recognition) and TTS (Speech Synthesis) with PaddleNLP-based chitchat.
    • Voiceprint Recognition: Demonstrates PaddleSpeech voiceprint features.
    • Speech Recognition: Supports Real-time ASR, End-to-End ASR, and Audio File ASR.
    • Speech Synthesis: Supports Streaming and End-to-End synthesis.
    • Voice Commands: Uses ASR and PaddleNLP information extraction for intelligent tasks (e.g., smart reimbursement).

    Via vc.py:

    • One-sentence Synthesis: Voice cloning using GE2E and ECAPA-TDNN models to mimic input audio.
    • Small Data Finetuning: A scheme for finetuning based on small datasets (includes a default 12-sentence Chinese female voice example).
    • ERNIE-SAT: A visual demonstration of the language-speech cross-modal large model, supporting personalized synthesis, cross-lingual synthesis, and speech editing.
  2. Overview of the TAL_CSASR dataset

    develop

    The TAL_CSASR dataset consists of English class audio featuring mixed Chinese and English speech. It is designed for tasks involving intra-sentence and inter-sentence code-switching. The dataset contains over 100 speakers (specifically 200+) and focuses on audio from English teachers' instruction.

    Key Dataset Specifications:

    • Content Type: Mixed Chinese and English speech (Ratio of Chinese characters to English words is 13:1).
    • Total Duration: 587 hours (Train: 555.9H, Dev: 8H, Test: 23.6H).
    • Audio Format: .wav files.
    • Sample Rate: 16000 Hz.
    • Sample Bit: 16 bit.
    • Audio Duration Range: 1 to 60 seconds.
    • Transcription Format: .txt files (for test sets).
    • Recording Context: Captured via microphone in 2019.
  3. Overview of Transformer/Conformer ASR with Librispeech ASR2

    develop

    This example provides a complete pipeline for training Transformer or Conformer-based Automatic Speech Recognition (ASR) models using the Librispeech dataset. It utilizes Kaldi functions and is managed via a central run.sh script.

    Prerequisites:

    • Install Kaldi before proceeding.
    • The pipeline is divided into several stages, which can be executed individually or in ranges using the --stage and --stop_stage flags.
    # Run stages 2 and 3 only
    bash run.sh --stage 2 --stop_stage 3
    
    # Run only stage 0
    bash run.sh --stage 0 --stop_stage 0
  4. Overview of VITS with AISHELL-3 for Voice Cloning

    develop

    This example demonstrates how to train a VITS (Variational Inference with adversarial learning for end-to-end Text-to-Speech) model using the AISHELL-3 dataset. The workflow is designed to enable Voice Cloning by leveraging a speaker encoder trained via Speaker Verification (GE2E).

    Key components:

    1. Speaker Encoder: Uses a GE2E model to generate speaker embeddings for each sentence. These embeddings are concatenated with encoder outputs during synthesis.
    2. Synthesizer and Vocoder: The VITS architecture integrates both the synthesizer and the vocoder.

    The general pipeline involves: Speaker Encoder training $\rightarrow$ Data Preprocessing (generating embeddings) $\rightarrow$ Model Training $\rightarrow$ Waveform Synthesis $\rightarrow$ Voice Cloning Inference.

  5. Overview of Parakeet TTS toolkit

    develop

    Parakeet is a text-to-speech (TTS) toolkit built on PaddlePaddle dynamic graph. It provides a standardized pipeline for TTS development, including data preprocessing, module sharing, model configuration, training, and synthesis.

    The toolkit is organized into three main components:

    1. Text FrontEnd: Includes a rule-based Chinese frontend for text processing.
    2. Acoustic Models: Converts text to mel-spectrograms. Supported models include:
      • FastSpeech 2
      • SpeedySpeech
      • Transformer TTS
      • Tacotron 2
    3. Vocoders: Converts mel-spectrograms to raw audio waveforms. Supported models include:
      • Parallel WaveGAN
      • WaveFlow

    Additionally, Parakeet supports Voice Cloning using transfer learning and GE2E (Generalized End-to-End Loss).

  6. Overview of Whisper Model in PaddleSpeech

    develop
    Whisper is a general-purpose speech recognition model trained on a large dataset of diverse audio. It is a multi-task model capable of performing multi-lingual speech recognition, speech translation, and language identification. The Whisper models used here are trained by OpenAI Whisper.
  7. Overview of the AISHELL-3 dataset

    develop

    AISHELL-3 is a large-scale, high-fidelity multi-speaker Mandarin speech corpus designed for training multi-speaker Text-to-Speech (TTS) systems.

    Key Characteristics:

    • Content: Approximately 85 hours of emotion-neutral recordings.
    • Scale: 218 native Chinese Mandarin speakers and 88,035 utterances.
    • Metadata: Explicitly marked auxiliary attributes including gender, age group, and native accents.
    • Transcriptions: Provided at both Chinese character-level and pinyin-level with high accuracy (>98% for word & tone).

    Usage Note: This database is free for academic research only. Commercial use requires explicit permission.

  8. Overview of Audio Searching Demo

    develop

    The Audio Searching demo demonstrates how to build an audio similarity retrieval system capable of searching through large-scale audio datasets (e.g., hundreds of millions of tracks).

    Core Workflow

    1. Vectorization: Audio clips are converted into vector data using PaddleSpeech pre-training models (such as audio classification or speaker recognition models).
    2. Storage:
      • Milvus: An open-source vector database used to store and index the vectors. Milvus automatically generates a unique ID for each vector.
      • MySQL: Stores the mapping between the Milvus vector IDs and the corresponding audio metadata (e.g., audio ID, speaker ID).
    3. Retrieval: Users upload test audio, which is converted into a vector. A similarity search is performed in Milvus to find the closest vector IDs, which are then used to query the metadata in MySQL.

    Dataset Support

    The demo is pre-configured to use the CN-Celeb dataset (650,000+ audio entries, 3,000 speakers), but it can be adjusted to use other datasets such as Librispeech, VoxCeleb, UrbanSound, GloVe, or MNIST.