This repository has been archived on 2026-10-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
PICKA_python/tools/calibration_simple.py
2026-09-22 11:52:03 +02:00

17 lines
384 B
Python

import soundfile as sf
from playsound import playsound
import numpy as np
import sys
from threading import Thread
z, fs = sf.read('./calibration_emotion_cut.wav')
# options.attenuation_dB = 36;
z = z * np.power(10.0, (-21.0 / 20))
sf.write("calibration_e.wav", z, fs)
try:
Thread(target=playsound, args=("calibration_e.wav", )).start()
except KeyboardInterrupt:
sys.exit()