i6_core.audio.encoding

class i6_core.audio.encoding.BlissChangeEncodingJob(*args, **kwargs)

Uses ffmpeg to convert all audio files of a bliss corpus (file format, encoding, channel layout)

For all parameter holds that “None” means to use the ffmpeg defaults, which depend on the input file and the output format specified.

Parameters:
  • corpus_file – bliss corpus

  • output_format – output file ending to determine container format (without dot)

  • sample_rate – target sample rate of the audio

  • codec – specify the codec, codecs are listed with ffmpeg -codecs

  • codec_options – specify additional codec specific options (be aware of potential conflicts with “fixed bitrate” and “sample_rate”)

  • fixed_bitrate – a target bitrate (be aware that not all codecs support all bitrates)

  • force_num_channels – specify the channel number, exceeding channels will be merged

  • select_channels – tuple of (channel_layout, channel_name), see ffmpeg -layouts this is useful if the new encoding might have an effect on the duration, or if no duration was specified in the source corpus

  • ffmpeg_binary – path to a ffmpeg binary, uses system “ffmpeg” if None

  • hash_binary – In some cases it might be required to work with a specific ffmpeg version, in which case the binary needs to be hashed

  • recover_duration – This will open all files with “soundfile” and extract the length information. There might be minimal differences when converting the encoding, so only set this to False if you’re willing to accept this risk. None (default) means that the duration is recovered if either output_format or codec is specified because this might possibly lead to duration mismatches.

  • in_codec – specify the codec of the input file

  • in_codec_options – specify additional codec specific options for the in_codec