C5 W3 A3 E2 - Trigger Word Detection - insert_audio_clip function

I am getting this error - AssertionError: The segment length must match the audio clip length

However in while loop 2 previous iterations are working fine its the 3rd iteration which is giving this error.

Hi @gauravsamant ,

The assertion error is raised because the audio clip is not the same length as the segment length. The loop is for checking overlapping with the previous segment which is passed in as input argument of this function. So you need to check how the segment is obtained.