def setUp(self): self.msg = SpeechRecognitionSphinx() self.msg.req.words = ['test', 'testing'] self.msg.req.grammar = [] self.msg.req.sentences = ['test', 'testing'] self.msg.req.language = 'el' self.msg.req.audio_source = 'nao_wav_1_ch' self.msg.req.audiofile = path.join(testdatadir, 'silence_sample.wav') self.startTime = time.time()
def __init__(self): rospack = rospkg.RosPack() pkgDir = rospack.get_path('rapp_testing_tools') audioFile = path.join(pkgDir, 'test_data', 'deutera.wav') self.msg = SpeechRecognitionSphinx(language='el', audio_source='headset', words=[u'Δευτέρα'], sentences=[u'Δευτέρα'], grammar=[u'Δευτέρα'], audiofile=audioFile) self.svc = RappPlatformService(self.msg) self.valid_words_found = [u'Δευτέρα']
def __init__(self): rospack = rospkg.RosPack() pkgDir = rospack.get_path('rapp_testing_tools') audioFile = path.join(pkgDir, 'test_data', 'thelw-voithia.wav') self.msg = SpeechRecognitionSphinx(language='el', audio_source='nao_wav_1_ch', words=[u'θέλω', u'βοήθεια'], sentences=[u'θέλω', u'βοήθεια'], grammar=[], audiofile=audioFile) self.svc = RappPlatformService(self.msg) self.valid_words_found = [u'θέλω', u'βοήθεια']
def __init__(self): rospack = rospkg.RosPack() pkgDir = rospack.get_path('rapp_testing_tools') audioFile = path.join(pkgDir, 'test_data', 'speech_detection_samples', 'recording_yes.ogg') self.msg = SpeechRecognitionSphinx(language='en', audio_source='nao_ogg', words=[u'yes', u'no'], sentences=[u'yes', u'no'], grammar=[], audiofile=audioFile) self.svc = RappPlatformService(self.msg) self.valid_words_found = [u'yes']
def test_attribute_error(self): _msg = SpeechRecognitionSphinx( filepath=path.join(testdatadir, 'qrcode.png', fast=True))