adapted for RecognitionManager.js API