0

audio password

import wave w_one = wave.open('file_one', 'r') w_two = wave.open('file_two', 'r') if w_one.readframes() == w_two.readframes(): print('exactly the same') else: print('not a match') do this code matches all the properties of audio? like if the sentences in both files are same but pitch and frequency are different,,then what will be the output??

30th Jun 2021, 4:17 PM
Sahil Jain
Sahil Jain - avatar
2 Respuestas
+ 2
If you want to make a audio password checker I think you need something more than simple comparison. You should override the operator '==' to define Wich waves are actually alike? I suggest you visit the python wave module documentation: https://docs.python.org/3/library/wave.html If you didn't visit it yet
23rd Jul 2021, 11:27 AM
Abolfazl Dahaghayn
Abolfazl Dahaghayn - avatar
+ 2
Hello Wave.readframes() return an object of type "bytes" so two wave match together when they actually are one file but I think it's no problem if file name changes. So answer of your first question is YES and for your second question I can say it prints "not a match"
23rd Jul 2021, 11:19 AM
Abolfazl Dahaghayn
Abolfazl Dahaghayn - avatar