Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrupted tfrecords generation with ddsp_prepare_tfrecord #389

Open
iCorv opened this issue Sep 2, 2021 · 1 comment
Open

corrupted tfrecords generation with ddsp_prepare_tfrecord #389

iCorv opened this issue Sep 2, 2021 · 1 comment

Comments

@iCorv
Copy link

iCorv commented Sep 2, 2021

  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.

@nglazyrin
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants