ano-demo / AdvAttacksASVspoof

This is the implementation of the paper "Adversarial Attacks on Spoofing Countermeasures of automatic speaker verification".
42 stars 15 forks source link

About gen_adv_wav.py #5

Closed zxynbnb closed 3 years ago

zxynbnb commented 3 years ago

I want to generate all of the adv .wav file of adv_specs, so I change NUM_UTTS=24844 and NUM_FRAMES=1. But I found that when NUM_FRAMES<600 there was something wrong. The bug is following:

System list: ['US_1', 'SS_1', 'VC_1', 'SS_2', 'SS_4', '-', 'VC_4'] Processing system: US_1 Traceback (most recent call last): File "gen_adv_wav.py", line 66, in main(args) File "gen_adv_wav.py", line 45, in main adv_wav = revert_power_db_to_wav(spec, adv_spec) File "/home/zxy/Documents/AdvAttacksASVspoof-master/preprocess/generic.py", line 60, in revert_power_db_to_wav complex_specgram = mag * phase ValueError: operands could not be broadcast together with shapes (863,600) (863,474)

Only when I change NUM_FRAMES>=600, the error was disappeared. It seems that there was requirement for NUM_FRAMES. So how can I generate all of adversarial .wav files from adv_specs? Thank you!