<< audiosupportedformats | Audio playback | beep >> |
audiowrite(filename, y, fs) |
audiowrite(filename, y, fs, fieldname, fieldvalue, ...) |
a string: filename to create.
a matrix: audio data.
an integer value: sampling rate.
a string: 'BitsPerSample', 'BitRate', 'Quality', 'Title', 'Artist' or 'Comment' .
value associated to the fieldname.
audiorwrite writes an audio file.
More 26 files format supported. See audiosupportedformats function to have all supported formats.
wav_audio = [modulepath('audio'), '/examples/haha.wav'];
[y, fs] = audioread(wav_audio);
dest_ogg = [tempdir(), 'haha.ogg'];
audiowrite(dest_ogg, y, fs);
dest_flac = [tempdir(), 'haha.flac'];
audiowrite(dest_flac, y, fs);
dest_mp3 = [tempdir(), 'haha.mp3'];
audiowrite(dest_mp3, y, fs);
dest_caf = [tempdir(), 'haha.caf'];
audiowrite(dest_caf, y, fs);
audioplayer, audiosupportedformats.
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET