Change sound clips from audible to ultrasonic range
조회 수: 4 (최근 30일)
이전 댓글 표시
I have sound clips that are about 3-4 seconds in human audible range. I want to convert them into ultrasonic range so that when I transmit them they are not audible to humans. I read that I need to use amplitude modulation. I used the modulate function of matlab.
[y,Fs] = audioread('TakeASelfie.mp3');
x = modulate(y,30700, 62000, 'am');
soundsc(x,62000)
audiowrite('modulated.wav', x, 62000)
In the above example, I was trying to convert my audio clip to 30.7kHz. However, after I performed modulation, the length of the clip was decreased. How can I change the frequency of my sound clip without changing the length of it? Thank you.
댓글 수: 0
답변 (1개)
Mark Schwab
2018년 1월 26일
The behavior that you are experiencing is not expected. I tried reproducing this on my machine and the size of the signal remained the same after modulation. You can test this out by running the following code
load handel;
x = modulate(y,1000,Fs,'am');
audiowrite('tmp.wav',x,Fs)
I tried distorting the data of my signal by adding NaNs or infs to y but this still returned a signal of the same length as the original. Can you provide your .mp3 file?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!