def _callSphinxJava(self, audio_file):
    self.socket_connection.sendall("start\r\n")
    self.socket_connection.sendall("audioInput#" + audio_file + "\r\n")
    start_time = time.time()
    words = []
    while(True):
      line = self._readLine()
      self.socket_connection.sendall('Read line\r\n')
      if(len(line)>0):
        if(line[0]=="#"):
          stripped_down_line = line[1:-1].split(" ")
          for word in stripped_down_line:
            words.append(word)
        if("stopPython\n" in line):
          break
        if("CatchedException" in line):
            rospy.logerr(line)
            self._respawnSphinx()
            self._sphinxDied = True
            return words

      if (time.time() - start_time > 10):
        words.append("Error: Time out error")
        break
    return words

  ## Respawns Sphinx subprocess, if it terminates abruptly
dataset/ETHPy150Open rapp-project/rapp-platform/rapp_speech_detection_sphinx4/src/rapp_speech_detection_sphinx4/sphinx4_wrapper.py/Sphinx4Wrapper._callSphinxJava/original