MY WEBCAM TEST GUIDE

How to Use LIUM Speaker Diarization

Step-by-step guide to running LIUM Speaker Diarization locally, using its Java command-line tools and checking the resulting speaker segmentation file.

Before you start

LIUM Speaker Diarization is a command-line toolkit that processes a local audio recording and produces a segmentation file marking which speaker is active at each time. It runs locally as a Java application, so it does not send your recording to an online service. You need a Java runtime, the LIUM SpkDiarization JAR file, and an audio recording that the toolkit can read. The toolkit expects single-channel WAV audio with a sample rate such as 16 kHz. If your recording has a different format, convert it first with a media tool that supports WAV export.

Keep a copy of the original recording before processing. A clean recording with limited background noise usually produces easier-to-read output, but the tool can process many kinds of speech recordings. Check that the file path contains no unusual characters that may be hard for the Java command to handle.

Step-by-step instructions

The following steps show the command-line approach most often used with the LIUM toolkit and its Java interface.

Step 1: Place the LIUM SpkDiarization JAR file and the WAV recording in a known working directory.

Step 2: Open a terminal in that directory and run the main diarization command. The usual form is:

java -Xmx2024m -jar ./LIUM_SpkDiarization.jar --fInputMask=./recording.wav --sOutputMask=./recording.seg --doCEClustering recording

Step 3: If you prefer the newer GMM-based command, use the corresponding option set from the toolkit version you have. For example, some builds expose:

java -Xmx2024m -jar ./LIUM_SpkDiarization.jar --fInputMask=./recording.wav --sOutputMask=./recording.gmm.seg --doCEClustering --help recording

Step 4: Wait for the command to finish. It prints progress information while reading the audio, detecting speech segments and producing clusters. Do not close the terminal while it is running.

Step 5: Open the generated segmentation file in a plain text editor. Each line normally contains a show name, channel, start time, duration and cluster label such as S0, S1 or S2. These labels are speaker clusters, not verified identities.

Check the output

Confirm that the command produced a segmentation file next to the recording. The file should contain non-empty lines with time ranges and speaker labels. Play short portions of the recording at the points where the label changes and compare what you hear with the reported speaker change. This is useful because the toolkit may split one person into several clusters or merge two people into one cluster when their voices or recording conditions are similar.

The output is a plain text segmentation, not a transcript. It does not contain the words spoken. It also does not provide confirmed names for the speakers unless you match the clusters to people yourself.

Common problems and next steps

If the command cannot read the file, check that the WAV is single-channel and uses a supported sample rate. Audio with the wrong channel count can fail or produce poor segmentation. Converting the recording to 16 kHz mono WAV is a common correction before retrying.

If one speaker is divided into many small clusters, use fewer clusters or adjust the clustering option available in your toolkit version. If two speakers are merged, try a recording with less background noise or a higher input level for the quieter speaker. Keep the original file unchanged so you can test different settings without losing source audio.

For a Python workflow, you can call the Java tool from a script using the subprocess module, or use a Python wrapper that prepares the WAV file and parses the resulting segmentation file. The toolkit itself remains the Java processing engine that the script invokes.

If the output is empty or contains only the header, check that the recording contains intelligible speech and that the file path was passed correctly. Missing or silent audio is not enough to create useful speaker clusters.