0

I followed this description to learn how to create a magnet stripe card reader, and I got a pretty good result with samples provided here.

However, the samples provided two audio files which were encoded with 1 channel, 16 bits and 44100 sample rate, and worked great with the codes provided inside the folder (dab.py), but when I tested with an audio I had which was encoded with 1 channel, 8 bits and 10000 sample rate, the codes gave me this error:

"unpack requires a bytes object of length 2"

How should I modify the code to avoid this error?

  • what process created your audio file with a 10k sample rate ? 44100 is the standard sample rate, 10000 is decidedly non standard ... have you tried playing that same audio file using a normal audio player like vlc ? I am trying to understand whether the issue is in the synthesis of that audio file or in its rendering ( playback ) – Scott Stensland Apr 06 '18 at 14:40
  • actually I got the audio file with the sample rate I mentioned from my friend that he said he took it from a card skimmer. I am sorry that I could not show you that file because it contained actual card information. Let's talk about the skimmer I mentioned earlier, it was super small that it could fit an ATM card slot without being noticed. I think people who installed it must use some technique to compress the audio file so that they could record an audio for a longer time. – V. Southammavong Apr 09 '18 at 01:42

0 Answers0