audiomate.corpus.conversion¶
This module contains classes to convert the data of a corpus. It is for example used to convert all audio data to wav files.
Audio File Conversion¶
-
class
audiomate.corpus.conversion.
AudioFileConverter
(sampling_rate=16000, separate_file_per_utterance=False, force_conversion=False)[source]¶ Base class for converters that convert all audio to a specific format. A converter creates a new instance of a corpus, so that all audio files meet given requirements.
Parameters: - sampling_rate (int) – Target sampling rate to convert audio to.
- separate_file_per_utterance (bool) – If
True
, every utterance in the resulting corpus is in a separate file. IfFalse
, the file/utt structure will be preserved. - force_conversion (bool) – If
True
, all utterances will be converted whether or not it already matches the target format. IfFalse
, only utterances not matching the target format will be converted. Others are reference to the original files.