Skip to content

Commit

Permalink
Exclude a google-asr functional test - Sometimes fails
Browse files Browse the repository at this point in the history
  • Loading branch information
klpanagi authored and athallas committed Jul 1, 2016
1 parent 2de004a commit 68d74e5
Showing 1 changed file with 17 additions and 16 deletions.
Expand Up @@ -53,24 +53,25 @@ def test_wavFile(self):
self.assertEqual( 'no' in response.words, True)

## Tests Google ASR with a NAO recorded ogg file. Should return "Monday"
def test_wavFile_2(self):
rospack = rospkg.RosPack()
google_service = rospy.get_param(\
"rapp_speech_detection_google_detect_speech_topic")
rospy.wait_for_service(google_service)
stt_service = rospy.ServiceProxy(google_service, SpeechToTextSrv)
req = SpeechToTextSrvRequest()
req.filename = rospack.get_path('rapp_testing_tools') + \
'/test_data/speech_detection_samples/recording_monday.ogg'
req.audio_type = 'nao_ogg'
req.user = 'rapp'
req.language = 'en'
response = stt_service(req)
words_basic = len(response.words)
# @unittest.skip("Depends on Google ASR result - Sometimes fails")
# def test_wavFile_2(self):
# rospack = rospkg.RosPack()
# google_service = rospy.get_param(\
# "rapp_speech_detection_google_detect_speech_topic")
# rospy.wait_for_service(google_service)
# stt_service = rospy.ServiceProxy(google_service, SpeechToTextSrv)
# req = SpeechToTextSrvRequest()
# req.filename = rospack.get_path('rapp_testing_tools') + \
# '/test_data/speech_detection_samples/recording_monday.ogg'
# req.audio_type = 'nao_ogg'
# req.user = 'rapp'
# req.language = 'en'
# response = stt_service(req)
# words_basic = len(response.words)

# Check number of words
self.assertEqual( words_basic, 1)
self.assertEqual( 'Monday' in response.words, True)
# self.assertEqual( words_basic, 1)
# self.assertEqual( 'Monday' in response.words, True)

## Tests Google ASR with an image. Should return nothing
def test_imageFile(self):
Expand Down

0 comments on commit 68d74e5

Please sign in to comment.