Join our official Discourse to discuss with SpeechBrain users coming from all around the world!

Contributing to the code of SpeechBrain

The goal is to write a set of libraries that process audio and speech in several ways. It is crucial to write a set of homogeneous libraries that are all compliant to a set of guidelines all described in our documentation .

Zen of SpeechBrain

SpeechBrain could be used for research, academic, commercial, non-commercial purposes. Ideally, the code should have the following features:

Simple: the code must be easy to understand even by students or by users that are not professional programmers or speech researchers. Try to design your code such that it can be easily read. Given alternatives with the same level of performance, code the simplest one (i.e the most explicit manner is preferred).

Readable: SpeechBrain mostly adopts the code style conventions of PEP8. The code written by the users must be compliant with that.

Efficient: The code should be as efficient as possible. Contributors should maximize the use of pytorch native operations. Test the code carefully with your favorite profiler (e.g, torch.utils.bottleneck ) to make sure there are no bottlenecks in your code. Since we are not working in c++ directly, the speed can be an issue.

Modular: Write your code such that it is very modular and fits well with the other functionalities of the toolkit. The idea is to develop a bunch of models that can be naturally interconnected with each other.

Well documented: Given the goals of SpeechBrain, writing rich and good documentation is a crucial step.

How to get my code into SpeechBrain?

SpeechBrain is hosted via GitHub . Hence, the process of integrating your code to the toolkit will be done via this plateform. Then, three steps can be followed:

1. Fork, clone the repository and install our test suite as detailled in the documentation .
2. Add your code and make sure that the tests still run properly. Commit your changes to your fork with our pre-commit tests to ensure the normalisation of your code. Then open a pull request on the official repository.
3. Participate in the review process. Each pull request is reviewed by one or two reviewers. Please integrate their feedbacks into your code. Once reviewers are happy with your pull request, they will merge it into the official code.

Details about this process (i.e including steps for installating the tests) are given in the documentation .

How can I help?

Interractions between speech technologies and deep learning are various and numerous. Therefore, we do not provide any official development directions. Instead, we believe that the toolkit will evolve accordingly to the needs of the different research fields and industry. Examples of contributions include new recipes, better models for higher performance, new external functionalities, or even core changes and extensions. While we do not provide any instructions on the potential interesting applications, feel free to jump into our Discourse or GitHub to see if any existing issue remains unsolved!


In this section we thanks all the peoples that contributed to SpeechBrain.