GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - yskim3271/taps-baselines: Preprocessing and baseline training code for TAPS, the Throat and Acoustic Paired Speech dataset

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
conf
conf
 
 
dataprepare
dataprepare
 
 
models
models
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
criteria.py
criteria.py
 
 
data.py
data.py
 
 
enhance.py
enhance.py
 
 
evaluate.py
evaluate.py
 
 
metric_helper.py
metric_helper.py
 
 
requirements.txt
requirements.txt
 
 
solver.py
solver.py
 
 
train.py
train.py
 
 
utils.py
utils.py
 
 

Repository files navigation

TAPS: Throat and Acoustic Pairing Speech Dataset

This repository provides the preprocessing and baseline training code for the TAPS dataset. The code is written in PyTorch and uses the Huggingface Datasets library for data loading.

TAPS Dataset

The TAPS (Throat and Acoustic Pairing Speech) dataset is a unique speech dataset designed to support deep learning-based throat microphone speech enhancement. It consists of paired utterances recorded using both throat microphones (capturing vibrations from the neck) and acoustic microphones (recording airborne speech). The dataset aims to improve speech clarity in high-noise environments where conventional microphones struggle.

The dataset is publicly available and can be downloaded from the Huggingface repository: TAPS Dataset 🤗

For more information on the dataset, please visit our project page on http://taps.postech.ac.kr/

Hardware

The open-source hardware design and firmware for the TAPS recording device are available in a separate repository: taps_hardware

The repository includes:

  • PCB designs (Altium Designer) for the main board (STM32F3 microcontroller + acoustic microphone) and neck-mounted sensor board (IIM42652 IMU)
  • Firmware (STM32 C) for synchronized data acquisition and UART transmission

Data Preparation

We provide the complete preprocessing and temporal-alignment pipeline used to prepare the TAPS dataset. The pipeline includes data collection, time synchronization with multiple alignment strategies, audio denoising, silence trimming, and sample rate alignment.

The scripts and sample data are located in the dataprepare/ directory.

Step Script Description
0 step0_data_collector_gui.py Data collection from hardware via serial communication
1 step1_sync_audio.py Time synchronization with multiple alignment variants
2 step2_denoise_audio.py Audio denoising using Facebook's Denoiser model
3 step3_trim_by_energy.py Automatic silence trimming based on energy detection
3.1 step3_1_audio_slicer_gui.py Manual review and correction of trimmed audio
4 step4_upsample_throat.py Upsample accelerometer audio from 8 kHz to 16 kHz

For detailed usage instructions, see the Data Preparation README.

Baseline Models

Demucs

Demucs is a deep learning-based speech enhancement model that employs a convolutional encoder-decoder architecture with U-Net-style skip connections. It integrates a bidirectional LSTM for sequence modeling, effectively capturing temporal dependencies in speech. The model is particularly effective at reconstructing lost speech features and improving intelligibility.

📄 Reference: Demucs GitHub Repository

TSTNN

TSTNN (Two-Stage Transformer-based Neural Network) is a masking-based model designed for time-domain speech enhancement. It utilizes a two-stage transformer module (TSTM) consisting of local and global transformers. These modules refine speech representations by preserving important components while suppressing noise. However, the model struggles to reconstruct missing voiceless sounds, limiting its effectiveness in certain speech enhancement tasks.

📄 Reference: TSTNN Paper on arXiv | TSTNN GitHub Repository

SE-Conformer

SE-Conformer is a speech enhancement model that combines convolutional and transformer-based architectures. It employs a Conformer block for sequence modeling, capturing both local and global dependencies in speech signals. The model demonstrates strong performance in enhancing speech clarity, particularly by effectively reconstructing high-frequency components and voiceless sounds.

📄 Reference: SE-Conformer Paper (ISCA Archive)

Installation

pip install -r requirements.txt

Running Evaluation on the Test Set

The evaluate.py script is used to evaluate the model on the test set. The script will evaluate the model performace in terms of PESQ, STOI, CSIG, CBAK, and COVL. You can also evaluate the model using the STT model to calculate the Character Error Rate (CER) and Word Error Rate (WER). The default model for the STT evaluation is the whisper-large-v3-turbo-korean model which is a fine-tuned version of the whisper-large-v3-turbo model on the Korean language. You can change the model by changing the enhance.py script.

python evaluate.py --config=<path to the model configuration file> --checkpoint=<path to the checkpoint> --log_file=<filename of log> --device=<device>

For more details regarding possible arguments, please see:

usage: evaluate.py [-h] [--config CONFIG] [--checkpoint CHECKPOINT] [--log_file LOG_FILE] [--device DEVICE] [--eval_stt]

optinal arguments:
  -h, --help                show this help message and exit
  --config CONFIG           Path to the model configuration file.
  --checkpoint CHECKPOINT   Path to the checkpoint directory. default is current directory
  --log_file LOG_FILE       Name of the log file. default is "evalute.log"
  --eval_stt                Evaluate the model using the STT model.
  --device DEVICE           Specifies the device (cuda or cpu). default is "cuda"

Inference on the Test Set

The enhance.py script is used to enhance the audio samples in the test set.

python enhance.py --config=<path to the model configuration file> --checkpoint=<path to the checkpoint> --output_dir=<sample directory> --device=<device>

For more details regarding possible arguments, please see:

usage: enhance.py [-h] [--config CONFIG] [--checkpoint CHECKPOINT] [--output_dir OUTPUT_DIR] [--device DEVICE]

optinal arguments:
  -h, --help                show this help message and exit
  --config CONFIG           Path to the model configuration file.
  --checkpoint CHECKPOINT   Path to the checkpoint directory. default is current directory
  --output_dir OUTPUT_DIR   Directory to save the enhanced samples. default is "samples"
  --device DEVICE           Specifies the device (cuda or cpu). default is "cuda"

Hydra

We use Hydra to manage the configuration files. Hydra is a powerful tool for elegantly configuring complex applications. It composes and overrides configurations in a flexible way, making it easy to run multiple experiments with different configurations. See the Hydra Documentation for more information.

Train baseline models

The train.py script is used to train the model on the TAPS dataset. The script will save the model checkpoints, logs, and tensorboard logs in the outputs directory. You can also override any parameter in the configuration file using the command line.

The configuration files are stored in the configs directory. You can train baseline models by selecting the configuration file for the model you want to train. For example, to train the SE-Conformer model, you can use the config_seconformer.yaml configuration file. If you want to change model parameters, you can override model configs in conf/model directory.

python train.py --config_name="config_$ModelName" $OverrideParams
  • --config_name: (required, str) – Name of the configuration file to use.
  • $OverrideParams: (optional) – Override any parameter in the configuration file. For example, data.batch_size=16 will override the batch_size parameter in the configuration file.

Train using your own dataset

The default dataset used in this code is the TAPS dataset. You can train the model with your own dataset by changing the data.py and train.py scripts.

Download Pretrained Models

You can download the pretrained models from the following links: Google Drive

About

Preprocessing and baseline training code for TAPS, the Throat and Acoustic Paired Speech dataset

Topics

datasethuggingfacepytorchspeech-enhancementthroat-microphone

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.