Skip to content

Commit

Permalink
merge branch yoe/fix-build
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu committed Mar 5, 2022
2 parents 77a5b27 + e693e43 commit 52c7ab4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ def test_sphinx_english(self):
with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)
self.assertEqual(r.recognize_sphinx(audio), "one two three")

@unittest.skipIf("SKIP_ONLINE" in os.environ, "online tests disabled")
def test_google_english(self):
r = sr.Recognizer()
with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)
self.assertIn(r.recognize_google(audio), ["1 2 3", "one two three"])
self.assertIn(r.recognize_google(audio), ["1 2 3", "one two three", "123"])

@unittest.skipIf("SKIP_ONLINE" in os.environ, "online tests disabled")
def test_google_french(self):
r = sr.Recognizer()
with sr.AudioFile(self.AUDIO_FILE_FR) as source: audio = r.record(source)
self.assertEqual(r.recognize_google(audio, language="fr-FR"), u"et c'est la dictée numéro 1")

@unittest.skipIf("SKIP_ONLINE" in os.environ, "online tests disabled")
def test_google_chinese(self):
r = sr.Recognizer()
with sr.AudioFile(self.AUDIO_FILE_ZH) as source: audio = r.record(source)
Expand Down

0 comments on commit 52c7ab4

Please sign in to comment.