student_learn I believe you are referring to the following sample from the SDK repo that is used for the above.
If yes, then the parameters passed are correct, but this sample uses stereo audio, and you are also passing stereo option along with the parameters. In this case diarization will not be enabled as diarization is enabled for mono audio input. If your audio file is mono, then the speaker separation will not work as stereo option is passed. Try not setting the stereo option with your file and check if it works.
If it still does not work, then the sample needs some change to explicitly set diarizationEnabled to true and use the mono audio recording.
I would personally first try out the speech studio to upload the audio file and check if the required result is seen and then modify the code to generate a similar output. I hope this helps!!
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.