MATLAB: .txt to .wav file conversion conversiontxtwav Hello i am carrying out a project which will require conversion of a .txt file to a .wav file . Can anyone help me out with this ? Best Answer First load data from file using e.g. importdata:http://www.mathworks.com/help/techdoc/ref/importdata.htmlAnd then save it using wavwrite function:http://www.mathworks.com/help/techdoc/ref/wavwrite.html Related SolutionsMATLAB: Insert mp3 file in matlab You can use audioread function[y,fs]=audioread('yourfile.mp3')To play your filesound(y,fs)Look atdoc audioread MATLAB: Regarding .wav file % Create WAV file in current folder for this testload handel.mathfile='handel.wav';wavwrite(y, Fs, hfile)clear y Fs% Read the data back into MATLAB[y, Fs, nbits, readinfo] = wavread(hfile);% Save as ASCII text filesave('handel.txt', 'y', '-ASCII') Related QuestionAudio file (.wav) being overwrittenHow to filter a noisy sound with Kalman filterHow to import an audio fileAdding noise to a wav file??? Error: The expression to the left of the equals sign is not a valid target for an assignment.
Best Answer