title: How can i detect one word with speech recognition in Python
body: <p>I know how to detect speech with Python but this question is more specific:
  How can I make Python listening for only one word and then returns True if Python could recognize the word.</p>
  
  <p>I know, I could just let Python listen all the Time and then make something like that
  Pseudocode:</p>
  
  <pre><code>while True:
      if stt.listen() == "keyword":
          return True
  </code></pre>
  
  <p>I have already made that and the program is hanging up after some minutes of always listening (See at the end). So I need a way to only listen for one specific word. </p>
  
  <p><strong>What does "hang up" mean?</strong> The program is not crashing but not responding. It isn't listening to my voice anymore and when I press <code>STRG + C</code> it does nothing.</p>
  
  <p>I am searching for something like this:</p>
  
  <pre><code>while True:
      if stt.waitFor("keyword"):
          return True
  </code></pre>
  
  <p>Hope you understood, Best regards</p>