Record() - minimum lenght and silence at the begining

As long as there is no minlenght option availabe for Record() function, is there a trick to somehow force user to record at least specified seconds?

Another issue (which will be probably solved if the above will be solved) I have is how to avoid silent recordings.

In other words, I need to make following conditions effective:

  1. if recorded file less than 10 secs -> play ‘too short’ and prompt to rerecord.

  2. if user has provided silence at the beginning of recording and recorded file was interrupted after specified seconds of silence, i.e. a silent file was created. -> play ‘i did not hear anything’ and prompt to rerecord