23

I have an audio file, a recorded telephone conversation of 2 people, that I need to separate the voices of 2 speakers automatically. I am new to speech recognition and I looked at wave module of python but failed to find any fruitful information.

Please help how to start. Also please suggest me free python libraries which will help me in solving the problem.

cupofcalculus
  • 51
  • 1
  • 8
PJC
  • 231
  • 1
  • 2
  • 3

4 Answers4

16

The task of separation of the speakers is not a speech recognition task, it's a speaker recognition task. In the speech comminity this task is also known as speaker diarization. There are several packages for speaker diarization and speaker recognition available for Python:

SIDEKIT from LIUM

Bob toolkit from Idiap

Speaker diarization from ISCI

In case you are not restricted to Python, there are others:

LIUM speaker diarization

Speaker recognition setup in Kaldi. Includes state of the art DNN-based i-vectors called x-vectors.

Nikolay Shmyrev
  • 24,897
  • 5
  • 43
  • 87
4

Start with numpy, and I would look at spectrpgraphs (basically a rolling FFT) as a good method for distinguish different voices in an audio recording.

Here's the spectrogram function in Matplotlib:

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.specgram

I would recommend Python(x,y) if you're just getting started on a Windows platform.

vaibhaw
  • 151
  • 1
  • 2
  • 14
Carl F.
  • 6,718
  • 3
  • 28
  • 41
2

Check out sciKits Talkbox: http://projects.scipy.org/scikits/wiki/Talkbox

Unfortunutly tutorials are very restricted: http://www.ar.media.kyoto-u.ac.jp/members/david/softwares/talkbox/talkbox_doc/intro.html

billwild
  • 173
  • 1
  • 3
  • 12
0

Have a look at the CMU Sphinx Python library. It's developed in Java so I think that the Python libs are just wrappers for that. The project has a lot of ongoing research behind it.

Official wiki: http://cmusphinx.sourceforge.net/wiki/

Quick-start tutorial for linux here: http://probing.wikidot.com/speech-recognition-using-sphinx3-and-python

bcoughlan
  • 25,987
  • 18
  • 90
  • 141