You are currently viewing Python Script to Convert WAV Audio File to Text and cv File With Scipy

Python Script to Convert WAV Audio File to Text and cv File With Scipy

  • Post author:
  • Post category:Python

in this tutorial you will see how to convert audio files to txt with paython 3 using the scipy library first we must have imported all the corresponding libraries to carry out this process Paste the following code and you will get the results

import numpy as np
from scipy.io import wavfile as wav
from scipy.fftpack import fft
rate, data = wav.read('output.wav')

np.savetxt("output.csv", np.abs(fft(data)))

If you have any questions, do not hesitate to comment on this post and I will gladly help you as soon as possible.