Code Monkey home page Code Monkey logo

Comments (13)

chrisdonahue avatar chrisdonahue commented on July 17, 2024

Change ext to 'wav' not 'wave'

I need more information if that doesn't fix it

from wavegan.

Varshithpolu avatar Varshithpolu commented on July 17, 2024

I have used "wav" in the command but still the problem persists
i have attaches the screenshots below
screenshot from 2018-06-04 01 02 07

this is the command i used
screenshot from 2018-06-04 01 02 22

Thanks in advance

from wavegan.

chrisdonahue avatar chrisdonahue commented on July 17, 2024

I believe I have fixed it with the most recent update. The issue occurred if the number of WAV files in the directory was smaller than the number of shards. Should be fixed now, please give it another try!

from wavegan.

Varshithpolu avatar Varshithpolu commented on July 17, 2024

Hi,
sorry to bother you again,
but that didn't fix my problem
I would attach a wav file from my data .
could you please check with them .
test.zip
Thanks in advance

from wavegan.

chrisdonahue avatar chrisdonahue commented on July 17, 2024

I was able to successfully make tfrecords from those two files using my script. Not sure what the issue is.

What version of tensorflow are you using? Could you print out npershard in the script to see if that's the issue? Also, can you print _slices.shape after line 114? This information might help me debug the issue.

I suspect it might be an issue with FFmpeg

from wavegan.

kennu avatar kennu commented on July 17, 2024

Hello. Just a note to @Varshithpolu, I had the same problem with "empty dataset" errors. I solved it by using a longer wav file (several minutes instead of 10 seconds pieces).

from wavegan.

LiangqunLu avatar LiangqunLu commented on July 17, 2024

I have the same issue, in which the *tfrecord is empty. I downloaded the code 2 days ago. After I tested line by line, I figured out the issue from FFmpeg '_UnavailableError: FFmpeg must be installed to run this op. FFmpeg can be found at http://www.ffmpeg.org. [[Node: DecodeAudioV2 = DecodeAudioV2[stream="", device="/job:localhost/replica:0/task:0/device:CPU:0"](ReadFile, DecodeAudioV2/file_format, DecodeAudioV2/samples_per_second, DecodeAudioV2/channel_count)]]'

In my Ubuntu system, the issue was gone after I installed ffmpeg. However, another issue shows up '_example = tf.train.Example(features=tf.train.Features(feature={
#'id': tf.train.Feature(bytes_list=tf.train.BytesList(value=audio_id)),
'label': tf.train.Feature(bytes_list=tf.train.BytesList(value=audio_label)),
'slice': tf.train.Feature(int64_list=tf.train.Int64List(value=[j])),
'samples': tf.train.Feature(float_list=tf.train.FloatList(value=slice))
}))
' (the line I commented)
The error information is 'File "", line 1, in
tf.train.Feature(bytes_list=tf.train.BytesList(value=audio_id))

TypeError: 'S' has type str, but expected one of: bytes'

But anyway, the array is generated from ' tf.train.Feature(float_list=tf.train.FloatList(value=_slice))' and the tfrecord file is not empty now.

from wavegan.

chrisdonahue avatar chrisdonahue commented on July 17, 2024

@LiangqunLu I think that issue arises from using Python 3 which differentiates between str and bytes. You can always delete this line to avoid this issue. The labels are only added to the records for conditional GAN experiments

from wavegan.

anooptoffy avatar anooptoffy commented on July 17, 2024

I was also having issue with the tf_records creation,
I was using the following command for creation

python data/make_tfrecord.py
./new_data/sc09/train
./new_data/train
--name train
--ext wav
--fs 16000
--nshards 128
--slice_len 1.5 \

The files created are empty (0 bytes)

But when I changed slice_len to 1sec, I got all sorted out.
I also added --labels to pre append labels (train,test,valid) to the file names.
python data/make_tfrecord.py
./new_data/sc09/train
./new_data/train/
--name train --labels
--ext wav
--fs 16000
--nshards 128
--slice_len 1 \

[SOLVED]

from wavegan.

chrisdonahue avatar chrisdonahue commented on July 17, 2024

If anyone is having trouble with making datasets (empty TFrecord files), make sure FFmpeg is installed. It is required by the make_tfrecords.py file. On ubuntu 16: sudo apt install ffmpeg

from wavegan.

wbwdhr avatar wbwdhr commented on July 17, 2024

@Varshithpolu What method did you use to solve this problem? I also encountered this problem when I tried to build Dataset for SC09. Please help me!
I've already installed ffmpeg. But it still didn't work .
My tensorflow-gpu version is 1.4

this is the command i used:
python data/make_tfrecord.py ./sc09/train ./train --ext wav --fs 16000 --nshards 128 --slice_len 1.5

from wavegan.

chrisdonahue avatar chrisdonahue commented on July 17, 2024

You shouldn't have to build the dataset for SC09 from WAV files. You can get it prebuilt here:

https://drive.google.com/open?id=1qRdAWmjfWwfWIu-Qk7u9KQKGINC52ZwB

from wavegan.

wbwdhr avatar wbwdhr commented on July 17, 2024

@chrisdonahue Thank you very much for taking note of my questions!I have found a solution to this problem, hoping to help others.
1.Try not to use Windows system. Make sure your system is Ubantu 16.04.
2. Make sure you have installed ffmpeg;
3.【--slice_len 1】The meaning of this command is the length of time per slice. So make sure that this length is less than the audio length of your dataset. eg:SC09 dateset length is about 1.2s,so you should set 【--slice_len】 to a value shorter than 1.2 seconds. If you set 【--slice_len】 to 1.5, you will get some empty files.
4. Check your Python version. If your Python version is Python 3,you may encounter some errors when you adjust the length of the slice before running it.
Like this:TypeError: 'S' has type str, but expected one of: bytes'
The solutions to this problem are listed below in @LiangqunLu question. @chrisdonahue has offered a solution.

That's all.

from wavegan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.