There are two methods to install tensorflow on raspberry pi, installing form binary which is provided by ci.tensorflow.org (you can get all nighly builds for all platform) or building from source which is hard and takes lots of time and setup. Build usually fails multiple times unless you know exactly what you do.
I will explain, how I installed tensorflow 1.4 on raspberry pi3 from pre-compiled binary.
# For Python 2.7 sudo apt-get install python-pip python-dev # For Python 3.4 sudo apt-get install python3-pip python3-dev
Tensorflow nightly build for pi3 in python3 is avalilable here
Install tensorflow, for python 3.4 use pip3 and pip for python 2.7.
sudo pip3 install http://ci.tensorflow.org/view/Nightly/job/nightly-pi-python3/39/artifact/output-artifacts/tensorflow-1.4.0-cp34-none-any.whl
or download it if you need a backup and install the file
wget http://ci.tensorflow.org/view/Nightly/job/nightly-pi-python3/39/artifact/output-artifacts/tensorflow-1.4.0-cp34-none-any.whl sudo pip3 install ./tensorflow-1.4.0-cp34-none-any.whl
Test the installation,
$ python3 >>> import tensorflow as tf
If it is installed correctly, no errors will be shown. If there are errors while running, try uninstalling and install another nighty build binary. The tensorflow speech detection can be now run on raspberry pi after copying the files to the pi. Use scp for copying over ssh.
scp firstname.lastname@example.org:my_frozen_graph.py /tmp/my_frozen_graph.py scp email@example.com:conv_labels.txt /tmp/speech_commands_train/conv_labels.txt scp firstname.lastname@example.org:a5d485dc_nohash_0.wav /tmp/speech_dataset/left/a5d485dc_nohash_0.wav
Make sure to clone the tensorflow tree from github to raspberry pi before running the label_wav.py
git clone https://github.com/tensorflow/tensorflow.git cd tensorflow/examples/speech_commands python tensorflow/examples/speech_commands/label_wav.py \ --graph=./my_frozen_graph.pb \ --labels=./conv_labels.txt \ --wav=./a5d485dc_nohash_0.wav