This is a bit different from how OpenEars works by default:
the user clicks on the record button before they begin speaking and then an end button when they are finished
So you might want to reexamine the design a bit. The goal of OpenEars is continuous listening which automatically detects speech rather than the user stopping and starting listening with a manual interaction, and there is no API method that is designed for that UI.
You can probably do this with just OpenEars, and if you want to screen out noises and utterances that aren’t in your vocabulary you might want to add Rejecto.