# Pyannote gives wrong results

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpyannote-gives-wrong-results%2F34400%3E%5C
**Category:** Beginners\
**Created:** [March 22, 2023, 2:46pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpyannote-gives-wrong-results%2F34400 "2023-03-22T14:46:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laro1](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@laro1](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flaro1)%5C
**Post date:** [March 22, 2023, 2:46pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpyannote-gives-wrong-results%2F34400%2F1 "2023-03-22T14:46:03Z")

</div>

I’m trying to use `pyannote` for `speaker diarization`  
and I’m getting wrong number of speakers.

Any example I tried I got wrong results.

For example:

- I used this youtube file:  
[https://www.youtube.com/watch?v=b2\_ZZ2UpSzI](https://www.youtube.com/watch?v=b2_ZZ2UpSzI)

- I convert it to wav file with sample rate of 16000.

I run the following code:

```
from pyannote.audio import Pipeline

TEST_FILE = "example.wav"
MY_TOKEN = "..."
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization",
                                    use_auth_token=MY_TOKEN)

diarization = pipeline(TEST_FILE)

```

And I got the following diarization:  
[![enter image description here](https://us1.discourse-cdn.com/hellohellohello/original/2X/4/4bde47c77f36eea4c41cb0e40c268be59085e619.png)](https://i.stack.imgur.com/PeUCU.png)

- The GT contains 4 speakers and not 2.

How can I tweak `pyannote` and get better results ?

---

<div class="post-metadata">

**Author:** ![julien-c](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julien-c/32/41937_2.png) [@julien-c](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjulien-c)%5C
**Post date:** [March 23, 2023, 9:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpyannote-gives-wrong-results%2F34400%2F2 "2023-03-23T09:19:24Z")

</div>

tagging @hbredin just for visibility

---

<div class="post-metadata">

**Author:** ![hbredin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hbredin/32/31902_2.png) [@hbredin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhbredin)%5C
**Post date:** [March 23, 2023, 9:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpyannote-gives-wrong-results%2F34400%2F3 "2023-03-23T09:31:05Z")

</div>

Duplicate of [pyannote gives wrong results · pyannote/pyannote-audio · Discussion #1290 · GitHub](https://github.com/pyannote/pyannote-audio/discussions/1290)
