반응형 Python61 Introducing Positron (data science) https://isabel.quarto.pub/end-to-end-data-science-with-the-positron-ide/#/title-slide End-to-end data science with the Positron IDEThe origin story Multi-language IDE for data science Made by Positron is a fork of the open source VSCode, customized for data science similar strategy to other IDEs such as Cursor able to use Open VSX extensions enables multilingual data science perhaps misabel.quar.. 2024. 12. 10. Visualize STFT fft_size가 frame_size( = 25) 이상인 가장 작은 2제곱 값따라서 fft_size는 32frame_shift = 10 # -*- coding: utf-8 -*-import waveimport numpy as npimport matplotlib.pyplot as pltif __name__ == "__main__": wav_file = './data/wav/xxx.wav' frame_size = 25 frame_shift = 10 out_plot = './spectrogram.png' with wave.open(wav_file) as wav: sample_frequency = wav.getframerate() num_samples = .. 2024. 11. 27. Visualize FFT 복소수 스펙트럼 계산:spectrum: np.fft.fft(frame)frame은 0.58초에서 시작 1024(2의 제곱승)만큼 크기 진폭스펙트럼 : 복소수 스펙터럼의 절대치 np.abs(spectrum)좌우대칭이므로 좌측만 사용 0~512까지 절대치 취함 로그 진폭 스펙트럼: 흔들리는 폭이 크므로 로그를 취함 np.logflooring: 진폭이 0인 주파수가 있으면 로그를 취할 때 마이너스 무한대 가능아주 작은 수인 1E-7(10의 마이너스 7승)을 더함 # -*- coding: utf-8 -*-import waveimport numpy as npimport matplotlib.pyplot as pltif __name__ == "__main__": wav_file = './data/wav/fft.. 2024. 11. 25. Visualize Speech Wave # -*- coding: utf-8 -*-import waveimport numpy as npimport matplotlib.pyplot as pltif __name__ == "__main__": wav_file = '../../data/wav/xxx.wav' out_plot = '../../plot.png' with wave.open(wav_file) as wav: sampling_frequency = wav.getframerate() sample_size = wav.getsampwidth() num_channels = wav.getnchannels() num_samples = wav.getnframes() waveform .. 2024. 11. 25. 이전 1 2 3 4 ··· 16 다음 반응형