Record, chop and send audios with Unity3D

I’m trying to make a feature for my Unity3D developed app.This feature needs to simultaneously record and send in small chunks the audio.

For example:

  • I record 2 minutes of audio
  • I need to send this audio chopped in chunks of 30 seconds.
  • But when I chop audio this add a little extra time with blank audio, I guess it is due a start and stop microphone.

Is there any way to record audio at the same time as chopping it and sending it?

I need a suitable solution for Android, PC and iOs, if possible.

Thanks

I would set a stopwatch just after you start the mic, and just after you stop it, and then check the time (down to milliseconds) and compare it to the audio size. Make sure it’s not working properly before continuing. And then, how much extra time are we talking? If it’s seconds, it’s definitely not Unity.