0

How do I do this, I have complex values at each array index composed of a real part and an imaginary part, how to get a distinct workable value out of these. I want to get the amplitude for each sample, the formula somewhere I read was sqrt(x^2+y^2); x[i], y[i] (for each 'i'th index of FFT array, come from a C background, newbie to Python).

from scipy.io import wavfile as wav
from scipy.fftpack import fft
import numpy as np

rate, data = wav.read('file.wav')

fft_out = fft(data)
print(fft_out)

The above code gives me complex no array, how do I get the required output? PS Trying to make a Speech to Text converter (Initial step, extract useful info out of a sample file).

damores
  • 2,251
  • 2
  • 18
  • 31

0 Answers0