changing sampling rate of an audio
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How to read a MP3 or WAV file and reduce it's sampling rate and save the new audio into a new file
0 Kommentare
Antworten (2)
Ameer Hamza
am 16 Okt. 2020
Bearbeitet: Ameer Hamza
am 16 Okt. 2020
Something like this
[y, Fs] = audioread('audio_in.wav');
audiowrite('audio_out.wav', y, round(Fs/2));
This divides the sampling frequency by 2.
1 Kommentar
Sebastien Dupertuis
am 25 Feb. 2021
In the documentation, it is written that: audiowrite supports only samples rates of 44100 and 48000.
So doing:
audiowrite('audio_out.wav', y, round(Fs/2));
will not be accepted by audiowrite (except if the result of round(Fs/2) is 44100 and 48000).
Star Strider
am 16 Okt. 2020
Import the file, then use the Signal Processing Toolbox resample function to resample it to a different sampling frequency.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Audio and Video Data finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!