I'm working on an audio project. My goal is to count the number of people who spokes in an audio file. We can consider that we already removed the noise from that audio.(for example, if there are two people talking in the audio the program can return 2 if there are three people talking in that audio the program will return 3...). I don't need speech recognition; I just want to know how many people talks. What is the best way to solve this problem?
Asked
Active
Viewed 1,033 times
2
1 Answers
1
If I am correct you are looking for speaker diarization
. In this thread someone listed a few options for python.
Python Speaker Recognition
Otherwise if you want to take the easier way, you can let google do it for you with their Cloud Speech-to-text
API. Not free, but also really cool.
More about that right here:
https://cloud.google.com/speech-to-text/docs/multiple-voices

Denel
- 81
- 3
-
But i dont need to separete the voices. I need just to count automatically how many people talk in that audio. for example if there is 3 people who talks in that audio file the program should return 3. and thanks a lot for your answer . – Kacem ICHAKDI May 24 '22 at 11:18
-
You actually do need to separate the voices, because only then you can count how many voices are in the audio file. I don't think a library exists that solves your problem so specifically that it will only return the amount of speakers. I think you are going to have to separate the voices from each other, and then count how many voices there are yourself. I would recommend looking at [sidekit](https://projets-lium.univ-lemans.fr/s4d/), but I don't think it's as easy as you would hope. – Denel May 24 '22 at 11:43
-
To add to this, I just found something that could be what you are looking for, you are going to have to see if you can implement this in your own project. https://github.com/faroit/CountNet – Denel May 24 '22 at 11:48
-
As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 24 '22 at 12:38
-
Ok tahnks man a lot for your answer. This is so helpful bacause if I understand how the program separate the voices i can just make a counter that count the number of speakers. I will do more research on this if I found some thing I'm gonna lake a new answer. – Kacem ICHAKDI May 24 '22 at 13:44
-
@KacemICHAKDI found any solution? I have a similar question https://stackoverflow.com/questions/73721003/python-count-total-number-of-speakers-in-a-call-audio – Digil Sep 14 '22 at 17:39