Initial release

This commit is contained in:
Francois JUMELLE
2021-05-03 22:32:40 +02:00
commit 20526d93c8
928 changed files with 452368 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import wave
extraits = ["extrait_cri3.wav", "extrait_cri4.wav"]
pokemons = ["wav\\{:03d}.wav".format(i) for i in range(1, 45+1)]
def extract(filename):
sound = wave.open(filename)
return sound.readframes(sound.getnframes())
def compare(ext_long, ext_short):
if ext_long.find(ext_short) != -1:
return True
return False
extraits_data = [extract(i) for i in extraits]
pokemons_data = [extract(i) for i in pokemons]
for ext_short in extraits_data:
for i in range(len(pokemons_data)):
if compare(pokemons_data[i], ext_short):
print(i+1)
break