from pyspeech import best_speech_result
import unittest
from pyaudio import PyAudio
import Queue

class PyspeechTest(unittest.TestCase):
  def setUp(self):
    self.p = PyAudio()

  def test_google_stt(self):
    good_morning = open('example_wavs/good_morning.wav', 'rb')
    output = best_speech_result(self.p, good_morning.read(), {}, "google")
    self.assertEqual(output, "good morning")

    hello_world = open('example_wavs/hello_world.wav', 'rb')
    output = best_speech_result(self.p, hello_world.read(), {}, "google")
    self.assertEqual(output, "hello world")

if __name__ == "__main__":
  unittest.main()

@@ -566,16 +566,538 @@
 orld%22)%0A%0A
+  # This will fail without a valid wit_token in profile.yml%0A  def test_wit_stt(self):%0A    import yaml%0A    profile = yaml.load(open(%22profile.yml%22).read())%0A    good_morning = open('example_wavs/good_morning.wav', 'rb')%0A    output = best_speech_result(self.p, good_morning.read(), profile, %22wit%22)%0A    self.assertEqual(output, %22good morning%22)%0A%0A    hello_world = open('example_wavs/hello_world.wav', 'rb')%0A    output = best_speech_result(self.p, hello_world.read(), profile, %22wit%22)%0A    self.assertEqual(output, %22hello world%22)%0A%0A
 if __nam

Add tests for Wit STT