/s3prl

Self-Supervised Speech Pre-training and Representation Learning Toolkit.

Primary LanguagePythonMIT LicenseMIT



MIT License Build Codecov Bitbucket open issues

What's New

  • Jan 2021: Readme updated with detailed instructions on how to use our latest version!
  • Dec 2020: We are migrating to a newer version for a more general, flexible, and scalable code. See the introduction below for more information! The legacy verison can be accessed by checking out to the tag v0.1.0: git checkout v0.1.0.

Introduction

  • This is an open source toolkit called S3PRL, which stands for Self-Supervised Speech Pre-training and Representation Learning.
  • In this toolkit, various upstream self-supervised speech models are available with easy-to-load setups, and downstream evaluation tasks are available with easy-to-use scripts.
  • Below is an intuitive illustration on how this toolkit may help you:

  • Feel free to use or modify our toolkit in your research, any bug report or improvement suggestion will be appreciated.
  • If you have any questions, please open up a new issue.
  • If you find this toolkit helpful to your research, please do consider to cite our papers, thanks!
List of papers that used our toolkit (Feel free to add your own paper by making a pull request)


Table of Contents


Installation

  • Python >= 3.6
  • PyTorch version >= 1.7.0
  • For pre-training new upstream models, you'll also need high-end GPU(s).
  • To develop locally, install s3prl by:
git clone https://github.com/s3prl/s3prl.git
cd s3prl
pip install -r requirements.txt
  • If you encounter error with a specific upstream model, you can look into the README.md under each upsream folder.
  • To use upstream models with the hub interface, cloning this repo is not required, only the requirements.txt in root directory and the one located at each upstream folder are needed.

Back to Top


Using upstreams

Back to Top


Using downstreams

  • Warning: we are still developing and testing some downstream tasks, documentation of a task will be added once it has been fully tested.
  • Instructions are documented here: Downstream README

Back to Top


Train upstream models

  • If you wish to train your own upstream models, please follow the instructions here: Pretrain README

Back to Top


Development pattern for contributors

  1. Create a personal fork of the main S3PRL repository in GitHub.
  2. Make your changes in a named branch different from master, e.g. you create a branch new-awesome-feature.
  3. Contact us if you have any questions during development.
  4. Generate a pull request through the Web interface of GitHub.
  5. Please verify that your code is free of basic mistakes, we appreciate any contribution!

Back to Top


Reference Repos

Back to Top

Citation

  • The S3PRL Toolkit:
@misc{S3PRL,
  author = {Andy T. Liu and Yang Shu-wen},
  title = {S3PRL: The Self-Supervised Speech Pre-training and Representation Learning Toolkit},
  year = {2020},
  publisher = {GitHub},
  journal = {GitHub repository},
  url = {https://github.com/s3prl/s3prl}
}