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

Cannot generate data and also TypeError #1

Closed
Kaustubhk12 opened this issue Jun 5, 2017 · 1 comment
Closed

Cannot generate data and also TypeError #1

Kaustubhk12 opened this issue Jun 5, 2017 · 1 comment

Comments

@Kaustubhk12
Copy link

DataGen.py did not generate any wav files. When I manually created "wavs" directory and placed some wav file myself there and ran wavs_to_features.py, I got the following:
[root@node2 bpm]# python wavs_to_features.py
wavs/120 AClassicEducation_NightOwl_RAW_02_03.wav
120 bpm
Traceback (most recent call last):
File "wavs_to_features.py", line 45, in
X, y, bpms, fnames = ns.get_spectogram_training_set(n_batch=len(tracks_subset))
File "/virtual_storage/kaustubh/june2017/bpm/ExtractFeatures.py", line 284, in get_spectogram_training_set
self.append_raw_wav_chunks_and_target_vectors(wav)
File "/virtual_storage/kaustubh/june2017/bpm/ExtractFeatures.py", line 196, in append_raw_wav_chunks_and_target_vectors
rng=self.rng)
File "/virtual_storage/kaustubh/june2017/bpm/ExtractFeatures.py", line 336, in get_target_vector
target_vec = np.random.rand(resolution) * 0.001
File "mtrand.pyx", line 1347, in mtrand.RandomState.rand (numpy/random/mtrand/mtrand.c:19701)
File "mtrand.pyx", line 856, in mtrand.RandomState.random_sample (numpy/random/mtrand/mtrand.c:15527)
File "mtrand.pyx", line 167, in mtrand.cont0_array (numpy/random/mtrand/mtrand.c:6127)
TypeError: 'float' object cannot be interpreted as an integer

@nlml
Copy link
Owner

nlml commented Jun 12, 2017

I don't have time to go into the details of this right now unfortunately, but perhaps it can be fixed by wrapping the parameter to whatever argument is expecting an integer with int()

@nlml nlml closed this as completed Jan 2, 2020
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