ddsp
ddsp copied to clipboard
corrupted tfrecords generation with ddsp_prepare_tfrecord
-
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
-
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())
-
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.
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)