Archived
Initial commit
This commit is contained in:
commit
d89b82be4a
103 files changed
+23110
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import soundfile as sf
|
||||
|
||||
def generate(stimulus, attenuation):
|
||||
x, fs = sf.read("/home/nao/PICKA/Python_scripts/stimuli/emotion/" + stimulus)
|
||||
x = x * 10.0 ** float(attenuation)/20
|
||||
sf.write('/home/nao/PICKA/Python_scripts/stimuli/emotion/gen_stimulus.wav', x,fs)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser(description="Generates stimulus for emotion PICKA test")
|
||||
parser.add_argument('-s', '--stimulus', help="Stimulus to be generated")
|
||||
parser.add_argument('-a', '--attenuation', help="Attenuation to be applied")
|
||||
args = parser.parse_args()
|
||||
generate(args.stimulus, args.attenuation)
|
||||
|
||||
|
||||
Reference in new issue
Block a user