Search Unity

Audio Audio Source doesn't play properly when you give more time to Microphone.Start()

Discussion in 'Audio & Video' started by SrTartarus, Jun 26, 2019.

  1. SrTartarus

    SrTartarus

    Joined:
    Feb 27, 2017
    Posts:
    9
    Hello there.

    I'm doing my own Microphone manager.
    I already have everything to do that, but right now, I have my function to take the spectrum data of my Audio Source, but there is something wrong because if I initialize Microphone.Start() with one second and I play my Audio Source its spectrum data doesn't take time to get it, but if I initialize Microphone.Start() with 15 seconds that's gonna take 5-10 seconds of delay to get that data.

    I need those 15 seconds of clip because I send that data to Google Speech to Text.
    Is there something in Unity to move or in my Audio Source?.

    I was thinking to combine each one second of samples length to a new float[] data like sum, but I don't know.

    Thanks!!.