.txt to .wav file conversion
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 ?
0 commentaires
Réponse acceptée
Grzegorz Knor
le 7 Mar 2012
First load data from file using e.g. importdata:
And then save it using wavwrite function:
Plus de réponses (1)
Karl
le 7 Mar 2012
That depends totally on the format of the TXT file. Step 1 is to read it into MATLAB and step 2 to maybe bring it into a format that is easy to export into WAV, which maybe fairly easy, see the doc for WAVWRITE:
Write WAVE (.wav) sound file
Syntax
wavwrite(y,filename)
wavwrite(y,Fs,filename)
wavwrite(y,Fs,N,filename)
For reading the TXT file, I ssuggest starting it interactively:
File -> Import Data
Make sure you click on "Genererate MATLAB Code" in the Import Wizard. That will create reusable code and you don't have to think a lot about learning syntax of the many import commands.
Voir également
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!