Added new parameter to specify the audio format, the previous solution was not good