How to make the script detect duplicated sounds

I would like the script to automatically detect duplicated sounds not by name, but by SoundId and copy them to a specific folder
I just don’t want to manually delete the duplicated sounds in the folder afterwards
here is the script:

print("creating folder...")
local folder = Instance.new("Folder")
folder.Parent = workspace
folder.Name = "AmbientSoundsDoors"

print("start")
repeat wait(0.05)
if workspace.Terrain:FindFirstChild("Attachment") then
    for i,v in pairs(workspace.Terrain.Attachment:GetChildren()) do
        if v:IsA("Sound") then 
            local sound = v:Clone()
            sound.Parent = workspace.AmbientSoundsDoors
            print("founded sound")
            v:Destroy()
            sound:Stop()
            sound.TimePosition = 0
        if sound.SoundId == v.SoundId then
            print("founded dublicated sound")
            sound:Destroy()
             end
        end
    end
end
until false

Why would there be duplicate sounds in the first place?

I need it for DOORS wiki ambient sound
like: Ghost, Window Knock, DoorKnock, Creak and more