We welcome contributions to Codec-SUPERB in several areas: models, datasets, and metrics. Here's how you can contribute:
- Fork the Codec-SUPERB repository.
- Add your model to the
SoundCodec
directory.- add model to
base_codec
first, create a class fromBaseCodec
and implement the abstract methods. For example:
from SoundCodec.base_codec import BaseCodec class MyCodec(BaseCodec): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # your init code here # data_item will be a dict object with # { # 'audio': { # 'array': resampled_waveform, # 'sampling_rate': sample_rate # } # } def extract_unit(self, data_item): # your extract unit code here # return ExtractedUnit( # unit=acoustic_token.squeeze(0).permute(1, 0), # stuff_for_synth=acoustic_token # ) pass def decode_unit(self, stuff_for_synth): # return numpy audio array with shape pass def synth(self, data, local_save=False): # your synth code here, you can treat data as a dict # return updated data # data['unit'] # data['audio'] with its path or data['audio']['array'] pass
- add different setting of your base model in
codec
folder
- add model to
- Add tests for your model in the
tests
directory. - Submit a pull request with your changes. Please include a detailed description of your model and how it improves Codec-SUPERB.
- Fork the Codec-SUPERB repository.
- Add your dataset to the
datasets
directory.- add a python file with dataset's name, eg. ds_name.py
- ds_name should include a function:
def load_data(): # your load data code here # return a dataset object # it should include at least two key: 'audio' and 'id' pass
- Add tests for your dataset in the
tests
directory. - Submit a pull request with your changes. Please include a detailed description of your dataset and how it improves Codec-SUPERB.
- Fork the Codec-SUPERB repository.
- Add your metric to the
metrics.py
file, following the existing format. - Add tests for your metric in the
tests
directory.