meta_post_processor
Author: Heli Qi Affiliation: NAIST Date: 2022.11
SpeechTextMetaPostProcessor
Bases: ABC
The base class for metadata post-processing of all the datasets. This class is not mandatory to be overridden. For contributing a new dataset dumping pipeline, please inherit this class in your meta_post_processor.py if needed and implement the abstract functions meta_post_process().
Source code in speechain/datasets/meta_post_processor.py
add_parse(parser)
staticmethod
The interface where users can add their own arguments. This function is not mandatory to be overridden.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parser
|
ArgumentParser
|
argparse.ArgumentParser The name space where you want to add your arguments. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
parser |
ArgumentParser
|
argparse.ArgumentParser The name space containing your arguments. |
Source code in speechain/datasets/meta_post_processor.py
main()
The entrance of SpeechTextMetaPostProcessor.
Source code in speechain/datasets/meta_post_processor.py
meta_post_process(src_path, **kwargs)
abstractmethod
The abstract function that must be overridden to post-process the metadata files in the given src_path for your target dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
src_path
|
str
|
str The path where the original dataset is placed. |
required |
**kwargs
|
The newly-added arguments for your dataset implementation. |
{}
|
Source code in speechain/datasets/meta_post_processor.py
parse()
Declaration function for the general arguments shared by all dataset implementations. There is one shared general argument here: 'src_path'.