Permalink
Browse files

remove linter errors

  • Loading branch information...
chriamue committed Dec 11, 2017
1 parent 513959c commit 0a7bf7cb2b3ad3af6635535670f2f5a639211fc3
Showing with 4 additions and 2 deletions.
  1. +4 −2 examples/tensorflow_commands.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import time
import speech_recognition as sr
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio # noqa
# obtain audio from the microphone
r = sr.Recognizer()
@@ -10,6 +10,7 @@
with m as source:
r.adjust_for_ambient_noise(source)
def callback(recognizer, audio):
try:
# You can download the data here: http://download.tensorflow.org/models/speech_commands_v0.01.zip
@@ -20,5 +21,6 @@ def callback(recognizer, audio):
except sr.RequestError as e:
print("Could not request results from Tensorflow service; {0}".format(e))
stop_listening = r.listen_in_background(m, callback, phrase_time_limit=0.6)
time.sleep(100)
time.sleep(100)

0 comments on commit 0a7bf7c

Please sign in to comment.