Problem with audio clip

I am on Trigger_word_detection_v2a lab and UNQ_C4.

i am calling insert_audio_clip(background, audio_clip, random_activate) like so and run into the following error in get_random_time_segment(segment_ms):

segment_start = np.random.randint(low=0, high=10000-segment_ms)

ValueError: low >= high

There may be another error in your implementation, but, the first thing to do is to check this syntax.

def insert_audio_clip(background, audio_clip, previous_segments):

What we want to insert is “audio_clip” which is “random_activates” in create_training_example().
Please double check.

By the way, “audio_clip” is a global variable created at the test for UNQ_C2 as follows.

audio_clip, segment_time = insert_audio_clip(backgrounds[0], activates[0], [(3790, 4400)])
audio_clip.export("insert_test.wav", format="wav")

It’s “pydub.audio_segment.AudioSegment”. For your attention…