I want to convert a .wav file to binary,modulate it,transmit,demodulate and convert the binary back to .wav file.But I am not able to write binary data back to wav file.
Mostra commenti meno recenti
wavdata = audioread('roja.wav');
wavbinary = dec2bin( typecast( single(wavdata(:)), 'uint8'), 8 ) - '0';
orig_size = size(wavdata);
wavb1=uint8(wavbinary);
w1=reshape(wavb1,15486976,1);
xmod=qammod(w1,16,0,'gray');
y1=awgn(xmod,10);
rdmod=qamdemod(y1,16,0,'gray');
% rdmod1=reshape(rdmod,1935872,8);
rdmod2=uint8(rdmod);
data = uint8(bin2dec( char( reshape( rdmod2, 8,[]).'+'0')));
audiowrite(data, 'rec_roja.wav',8000)
Error using bin2dec (line 55)
Binary string may consist only of characters 0 and 1
Error in wavb (line 14)
data = uint8(bin2dec( char( reshape( rdmod2, 8,[]).'+'0')));
also waveread is not working in r2016
6 Commenti
KALYAN ACHARJYA
il 25 Set 2018
Can you share roja.wav this file, so that we can try on your code?
KALYAN ACHARJYA
il 25 Set 2018
Modificato: KALYAN ACHARJYA
il 25 Set 2018
Delete your comment from answer section, please note this is comment section, you can use google drive and share
NEEMA RAJ
il 25 Set 2018
NEEMA RAJ
il 25 Set 2018
Modificato: Walter Roberson
il 26 Set 2018
KALYAN ACHARJYA
il 25 Set 2018
OK
NEEMA RAJ
il 26 Set 2018
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!