They are not duplicates. Some of them probably come from MME hostApi, some other may come from DirectSound hostApi, some other may come from Windows-KS, or WASAPI, or even ASIO.
I had the same situation, and I chose to keep from this device list only those coming from DirectSound and ASIO (when on Windows). You can filter the list with the key "hostApi" for the dict (0=mme, 1=directsound, etc. please check in the pyaudio doc).