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

Can't run project #4

Open
IronBCC opened this issue Dec 5, 2017 · 7 comments
Open

Can't run project #4

IronBCC opened this issue Dec 5, 2017 · 7 comments

Comments

@IronBCC
Copy link

IronBCC commented Dec 5, 2017

For both variants (from wav and mic recording) that I try - same error:
Traceback (most recent call last): File "parse_file.py", line 39, in <module> process_file(**vars(args)) File "parse_file.py", line 31, in process_file with WavProcessor() as proc: File "/mnt/Data/project/devicehive-audio-analysis/audio/processor.py", line 45, in __init__ self._init_youtube() File "/mnt/Data/project/devicehive-audio-analysis/audio/processor.py", line 74, in _init_youtube youtube8m.model.load_model(sess, params.YOUTUBE_CHECKPOINT_FILE) File "/mnt/Data/project/devicehive-audio-analysis/audio/utils/youtube8m/model.py", line 43, in load_model set_up_init_ops(tf.get_collection_ref(tf.GraphKeys.LOCAL_VARIABLES)) File "/mnt/Data/project/devicehive-audio-analysis/audio/utils/youtube8m/model.py", line 26, in set_up_init_ops if "train_input" in variable.name: AttributeError: 'str' object has no attribute 'name'
Model was downloaded from your link.

@Nikolay-Kha
Copy link
Contributor

What is your Python version?
python --version
You could also try to use python3 (do not forget to install dependencies with pip3).

@lishuchao012
Copy link

I meet the same problem, python2, python3 both not work

@igor-panteleev
Copy link
Contributor

Hi,
Can you share your pip freeze output?

@lishuchao012
Copy link

I have solved the problem imported by pycharm, maybe some dependencies not install

@isaacaddis
Copy link

Same here, but I have all dependencies installed as per the requirements.txt

@isaacaddis
Copy link

isaacaddis commented Jun 16, 2018

Ok, so to anyone having this problem, make sure to specify your mic using input_device_index=x on your self.in_stream() and self.out_stream() functions in device.py.

To find the ID of your input device, run (note, run sudo pip install sounddevice first):

import sounddevice
print(sounddevice.query_devices())

where you can look through all sound devices attached to your computer.

Edit:
So for example,
self.in_stream = self.pa.open(format=pyaudio.paInt16, channels=1, input_device_index = 3, rate=44100, input=True)

@isaacaddis
Copy link

This removed the initial problem I had, and it actually runs perfectly on my laptop running Linux Mint, but when I try to port the code to a Raspberry Pi 3 (which has all packages correctly installed with reference to the requirements.txt), I'm always given the -9981 Buffer Overffow error.

Is it impossible to run such an application on the limited hardware of the Raspberry PI? By the way thank you very much for publishing a really cool use of Tensorflow for audio analysis.

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

5 participants