# Error with annotation for speaker diarization

**URL:** <https://support.prodi.gy/t/error-with-annotation-for-speaker-diarization/4347>\
**Category:** Uncategorized\
**Tags:** usage, front-end, audio\
**Created:** [June 22, 2021, 2:01am UTC](https://support.prodi.gy/t/error-with-annotation-for-speaker-diarization/4347 "2021-06-22T02:01:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![VShakib](https://avatars.discourse-cdn.com/v4/letter/v/b4bc9f/32.png) [@VShakib](https://support.prodi.gy/u/VShakib)\
**Post date:** [June 22, 2021, 2:01am UTC](https://support.prodi.gy/t/error-with-annotation-for-speaker-diarization/4347/1 "2021-06-22T02:01:19Z")

</div>

Hi,

I'm using Prodigy to annotate some audio files for speaker diarization. I'm also using the pyannote open-source model which provides some Prodigy recipes as shown [here](https://github.com/pyannote/pyannote-audio/tree/master/tutorials/prodigy). I'm getting a weird issue where the audio file won't load and I can't annotate it. I'm getting this error with both the `pyannote.dia.manual` recipe and the standard `audio.manual` recipe. It's worth noting that I thought the error was because there were spaces in the file names, but that turned out not to be the issue.

 ![Screen Shot 2021-06-21 at 6.59.23 PM](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/7/7277545d099ceaa4aa2b9879dfa653126b92171a.png)

These are the commands I've tried running:  
prodigy pyannote.dia.manual test\_dataset test/  
prodigy audio.manual test\_dataset test/ --label SPEAKER1,SPEAKER2

How should I go about trouble-shooting this?

---

<div class="post-metadata">

**Author:** ![VShakib](https://avatars.discourse-cdn.com/v4/letter/v/b4bc9f/32.png) [@VShakib](https://support.prodi.gy/u/VShakib)\
**Post date:** [June 22, 2021, 3:17am UTC](https://support.prodi.gy/t/error-with-annotation-for-speaker-diarization/4347/2 "2021-06-22T03:17:29Z")

</div>

As a follow up, it seems like a sample wav file that I downloaded on the internet works, but the wav files I currently have don't. Are there any requirements/restrictions on types of wav files I can use, like sample rate or something else?

---

<div class="post-metadata">

**Author:** ![VShakib](https://avatars.discourse-cdn.com/v4/letter/v/b4bc9f/32.png) [@VShakib](https://support.prodi.gy/u/VShakib)\
**Post date:** [June 22, 2021, 3:30am UTC](https://support.prodi.gy/t/error-with-annotation-for-speaker-diarization/4347/3 "2021-06-22T03:30:21Z")

</div>

Apparently the audio annotation supports stereo audio but not mono. I could convert all my files to stereo, but is there any better/easier way of doing it / am I missing something?

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [June 23, 2021, 2:10am UTC](https://support.prodi.gy/t/error-with-annotation-for-speaker-diarization/4347/4 "2021-06-23T02:10:48Z")

</div>

Hi! Did you test it with the same files converted to stereo and did that solve the issue you were having? If so, this might be related, although I'm confused that it'd fail like this and give you a blank UI 🤔That's definitely strange and unideal.

If it's not related to stereo vs. mono, how large are your audio files and how are you loading them in? By default, Prodigy will encode the file as a base64 string, which is a fine solution for small snippets and means that the original data will be stored with the example (and it makes it easy to create short snippets and stream them in programmatically without having to store them on disk). However, if the file is very large, this can potentially lead to loading issues if it's all sent over REST as a string. In that case, you could try the audio server loader via `--loader audio-server`, which will serve the files via a local web server. Alternatively, you can also provide them as URLs (e.g. via an S3 bucket) with a JSONL file and `--loader jsonl`.

---

<div class="post-metadata">

**Author:** ![VShakib](https://avatars.discourse-cdn.com/v4/letter/v/b4bc9f/32.png) [@VShakib](https://support.prodi.gy/u/VShakib)\
**Post date:** [June 23, 2021, 6:54pm UTC](https://support.prodi.gy/t/error-with-annotation-for-speaker-diarization/4347/5 "2021-06-23T18:54:12Z")

</div>

Yes, after I converted my files to stereo, instead of mono, it worked fine.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [June 24, 2021, 3:19am UTC](https://support.prodi.gy/t/error-with-annotation-for-speaker-diarization/4347/6 "2021-06-24T03:19:55Z")

</div>

Thanks for checking, that's helpful! Glad to hear that there's at least a temporary workaround then.

I'll try and reproduce this to figure out what the underlying problem could be. Also, if you have a short sample of a working stereo and non-working mono snippet, that'd be helpful as well (also to double-check that there's nothing else that could be relevant here).
