Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the sliding windows are so tight in the diariazation process? #261

Open
ywangwxd opened this issue Dec 20, 2024 · 3 comments
Open

Why the sliding windows are so tight in the diariazation process? #261

ywangwxd opened this issue Dec 20, 2024 · 3 comments

Comments

@ywangwxd
Copy link

ywangwxd commented Dec 20, 2024

Luckily, I have integrated faster whisper successfully into the diart-spk branch. Maybe I will submit a PR later.

But I have a question about the sliding windows in diariazation. I used the default step parameter, set 5s as the duration for
diariazation and 5s for ASR respectively. I found the sliding windows features passed into the __call__ function of the
SpeakerAwareTranscription pipeline are very dense. They look like this:

Segment(0, 5)
Segment(0.5, 5.5)
Segment(1, 6)
Segment(1.5, 6.5)

There are too much overlapping between two consecutive windows. Even if I set batch size 32 to the diariazation process, the effective audio length for ASR is only 31*0.5+5=20.5s. This also makes the diariazation process much less efficient since there are two much redundant computation between two windows. Do I understand the underlying logic correctly? Should I assign a large value to the step parameter?

@ywangwxd
Copy link
Author

Luckily, I have integrated faster whisper successfully into the diart-spk branch. Maybe I will submit a PR later.

But I have a question about the sliding windows in diariazation. I used the default step parameter, set 5s as the duration for diariazation and 5s for ASR respectively. I found the sliding windows features passed into the __call__ function of the SpeakerAwareTranscription pipeline are very dense. They look like this:

Segment(0, 5)
Segment(0.5, 5.5)
Segment(1, 6)
Segment(1.5, 6.5)

There are too much overlapping between two consecutive windows. Even if I set batch size 32 to the diariazation process, the effective audio length for ASR is only 31*0.5+5=20.5s. This also makes the diariazation process much less efficient since there are two much redundant computation between two windows. Do I understand the underlying logic correctly? Should I assign a large value to the step parameter?

With the above doubts, I have tried setting step=4.5 and duration=5.0, e.g., with overlapping of 0.5 seconds. I have not found the SpeakerAwareDiariazation results getting worse. But it will be much more fast.

@juanmc2005
Copy link
Owner

Hi @ywangwxd, this kind of sliding window is made for the diarization pipeline, but if I remember correctly, in my blogpost about combining whisper and diart I used non-overlapping 2s windows to do this, so basically the window had to be readjusted down the line. Otherwise you get duplicate captions

@ywangwxd
Copy link
Author

Hi @ywangwxd, this kind of sliding window is made for the diarization pipeline, but if I remember correctly, in my blogpost about combining whisper and diart I used non-overlapping 2s windows to do this, so basically the window had to be readjusted down the line. Otherwise you get duplicate captions

So you mean, there is no need to have any overlapping between two consecutive sliding windows for diariazatio at all?
I know there is no need to have overlapping for ASR. But as you mentioned above, originally you need some overlapping for diarization. Then why it is not needed anymore when comibing diariazation and ASR? I found the parameters of duration and step are totally independent to each other for diariazation and ASR. In ASR, I do not need to specify step parameter because it was set as the same as duration (for asr) internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants