ddsp icon indicating copy to clipboard operation
ddsp copied to clipboard

corrupted tfrecords generation with ddsp_prepare_tfrecord

Open iCorv opened this issue 3 years ago • 1 comments

  1. Generating tfrecords with ddsp_prepare_tfrecord \ --input_audio_filepatterns /path/to/audio/* \ --output_tfrecord_path /path/to/train.tfrecords \ --alsologtostderr \ --sample_rate 48000 \ --frame_rate 250

  2. then running this code: import ddsp.training data_provider = ddsp.training.data.TFRecordProvider('/path/to/train.tfrecords*') dataset = data_provider.get_dataset(shuffle=False) ex = next(iter(dataset)) print(ex.keys())

  3. leads to invalid dict key error: tensorflow/core/framework/op_kernel.cc:1767] OP_REQUIRES failed at example_parsing_ops.cc:94 : Invalid argument: Key: audio. Can't parse serialized Example.

However, changing the sample rate back to 16000 in step 1. works.

iCorv avatar Sep 02 '21 09:09 iCorv

I believe you need to provide the sample_rate when creating the TFRecordProvider: data_provider = ddsp.training.data.TFRecordProvider('/path/to/train.tfrecords*', sample_rate=48000)

nglazyrin avatar Sep 09 '22 09:09 nglazyrin